[PATCH] D26219: Bitcode: Change reader interface to take memory buffers.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 1 16:45:29 PDT 2016


pcc added inline comments.


================
Comment at: llvm/lib/Bitcode/Reader/BitcodeReader.cpp:235
 protected:
-  BitcodeReaderBase() = default;
   BitcodeReaderBase(MemoryBuffer *Buffer) : Buffer(Buffer) {}
----------------
mehdi_amini wrote:
> Is this related to this commit?
Yes, this ctor is currently needed elsewhere (marked below).


================
Comment at: llvm/lib/Bitcode/Reader/BitcodeReader.cpp:402
   BitcodeReader(MemoryBuffer *Buffer, LLVMContext &Context);
-  BitcodeReader(LLVMContext &Context);
   ~BitcodeReader() override { freeState(); }
----------------
mehdi_amini wrote:
> Is this related to this change or can you remove this as a pre-commit?
Same here.


================
Comment at: llvm/lib/Bitcode/Reader/BitcodeReader.cpp:6691
-  std::unique_ptr<Module> M = llvm::make_unique<Module>(Name, Context);
-  BitcodeReader *R = new BitcodeReader(Context);
-
----------------
This is where we currently use the ctor.


https://reviews.llvm.org/D26219





More information about the llvm-commits mailing list