Fix bitcode auto-upgrade when using bitcode lazy loading
authorMehdi Amini <mehdi.amini@apple.com>
Sat, 13 Aug 2016 23:31:53 +0000 (23:31 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Sat, 13 Aug 2016 23:31:53 +0000 (23:31 +0000)
commite62aaf2303a11e53741b0dacb6d93f29ee706afc
treef3510c17da7b392de042b2497d3af85f2e87151d
parent8c629ecf3af5bc2717ceb62b73e4dda98fdfe82d
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.

llvm-svn: 278610
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]