diff options
Diffstat (limited to 'include/llvm/Bitcode')
-rw-r--r-- | include/llvm/Bitcode/BitstreamWriter.h | 3 | ||||
-rw-r--r-- | include/llvm/Bitcode/ReaderWriter.h | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Bitcode/BitstreamWriter.h b/include/llvm/Bitcode/BitstreamWriter.h index f76bb88dee..7fd23fe416 100644 --- a/include/llvm/Bitcode/BitstreamWriter.h +++ b/include/llvm/Bitcode/BitstreamWriter.h @@ -76,6 +76,9 @@ public: BlockInfoRecords.pop_back(); } } + + std::vector<unsigned char> &getBuffer() { return Out; } + //===--------------------------------------------------------------------===// // Basic Primitives for emitting bits to the stream. //===--------------------------------------------------------------------===// diff --git a/include/llvm/Bitcode/ReaderWriter.h b/include/llvm/Bitcode/ReaderWriter.h index f18b4fc090..7b1e06f655 100644 --- a/include/llvm/Bitcode/ReaderWriter.h +++ b/include/llvm/Bitcode/ReaderWriter.h @@ -22,6 +22,7 @@ namespace llvm { class ModuleProvider; class MemoryBuffer; class ModulePass; + class BitstreamWriter; class raw_ostream; /// getBitcodeModuleProvider - Read the header of the specified bitcode buffer @@ -45,6 +46,10 @@ namespace llvm { /// raw output stream. void WriteBitcodeToFile(const Module *M, raw_ostream &Out); + /// WriteBitcodeToStream - Write the specified module to the specified + /// raw output stream. + void WriteBitcodeToStream(const Module *M, BitstreamWriter &Stream); + /// CreateBitcodeWriterPass - Create and return a pass that writes the module /// to the specified ostream. ModulePass *CreateBitcodeWriterPass(std::ostream &Str); |