diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-08-14 00:01:27 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-08-14 00:01:27 +0000 |
commit | a71002e7f1be2382d4014763124b936d75cf61fd (patch) | |
tree | 4ac88c1f4f8d8edcc28fdd52c738d9d21f542151 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 822ee88ab88d8ce07c806c7311f79bcbde7fe6d0 (diff) | |
download | bcm5719-llvm-a71002e7f1be2382d4014763124b936d75cf61fd.tar.gz bcm5719-llvm-a71002e7f1be2382d4014763124b936d75cf61fd.zip |
Fix bitcode auto-upgrade when using bitcode lazy loading
The auto-upgrade path could be called before the VST (global
names) was fully parsed, and thus intrinsic names were not
available and the autoupgrade logic could not operate.
Fix link failures with ThinLTO.
This is a recommit of r278610 with a different fix.
llvm-svn: 278615
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 9bb8b2f50bb..3084410f700 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -3682,7 +3682,9 @@ std::error_code BitcodeReader::parseModule(uint64_t ResumeBit, // have been seen yet. In this case, just finish the parse now. if (SeenValueSymbolTable) { NextUnreadBit = Stream.GetCurrentBitNo(); - return std::error_code(); + // After the VST has been parsed, we need to make sure intrinsic name + // are auto-upgraded. + return globalCleanup(); } break; case bitc::USELIST_BLOCK_ID: |