Implement getLazyBitcodeModule() and parseBitcodeFile() in terms of it.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
llvm/include/llvm/Bitcode/BitcodeReader.h | ||
---|---|---|
48 ↗ | (On Diff #78106) | Can you document these two fields? |
llvm/lib/Bitcode/Reader/BitcodeReader.cpp | ||
850 ↗ | (On Diff #78106) | Why not in the initializer list? |
6607 ↗ | (On Diff #78106) | I think it is used only on error, isn't it? We may be able to pass the IdentificationBit to the BitcodeReader and have it jump there to get the ProducerIdentification only if needed. Might not worth the effort though. |
llvm/test/Bitcode/invalid.test | ||
38 ↗ | (On Diff #78106) | I'm surprised by this change, is it really intended? I suspect that some of your change is losing coverage here. (Same on most of the changes below) |
llvm/include/llvm/Bitcode/BitcodeReader.h | ||
---|---|---|
48 ↗ | (On Diff #78106) | Will do |
llvm/lib/Bitcode/Reader/BitcodeReader.cpp | ||
850 ↗ | (On Diff #78106) | This field belongs to BitcodeReaderBase. |
6607 ↗ | (On Diff #78106) | We also need to check the epoch in the identification block. I suppose we could have two functions, one that checks the epoch and the other that pulls the producer string, but again it doesn't seem worth the effort. |
llvm/test/Bitcode/invalid.test | ||
38 ↗ | (On Diff #78106) | Unfortunately some of our invalid bitcode files also have an invalid block size in addition to the problem under test, so we get an error trying to skip past the module in getBitcodeModuleList(). I'll see if I can restore coverage for these, but it may be some work as it will require binary patching of our test files. |
llvm/test/Bitcode/invalid.test | ||
---|---|---|
38 ↗ | (On Diff #78106) | Yeah that's really annoying. |
llvm/test/Bitcode/invalid.test | ||
---|---|---|
38 ↗ | (On Diff #78106) | Sounds reasonable to me. |