Add facility to dump pass manager structure
[oota-llvm.git] / include / llvm / Support / OutputBuffer.h
index 73a4a631debd11be328ac539bcf8448f561aed21..9c6456a1ab43473daa6d251a57c3ff741d01381a 100644 (file)
@@ -35,7 +35,7 @@ namespace llvm {
     // aligned to the specified power of two boundary.
     void align(unsigned Boundary) {
       assert(Boundary && (Boundary & (Boundary - 1)) == 0 &&
-             "Must alitypedef std::vector<unsigned char> DataBuffer;gn to 2^k boundary");
+             "Must align to 2^k boundary");
       size_t Size = Output.size();
       
       if (Size & (Boundary - 1)) {
@@ -138,6 +138,13 @@ namespace llvm {
       else
         assert(0 && "Emission of 64-bit data not implemented yet!");
     }
+
+    unsigned char &operator[](unsigned Index) {
+      return Output[Index];
+    }
+    const unsigned char &operator[](unsigned Index) const {
+      return Output[Index];
+    }
   };
   
 } // end llvm namespace