Fix bitcode auto-upgrade when using bitcode lazy loading
authorMehdi Amini <mehdi.amini@apple.com>
Sun, 14 Aug 2016 00:01:27 +0000 (00:01 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Sun, 14 Aug 2016 00:01:27 +0000 (00:01 +0000)
commita71002e7f1be2382d4014763124b936d75cf61fd
tree4ac88c1f4f8d8edcc28fdd52c738d9d21f542151
parent822ee88ab88d8ce07c806c7311f79bcbde7fe6d0
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
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/test/ThinLTO/X86/Inputs/autoupgrade.bc [new file with mode: 0644]
llvm/test/ThinLTO/X86/autoupgrade.ll [new file with mode: 0644]