[ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab
authorSteven Wu <stevenwu@apple.com>
Wed, 26 Aug 2020 17:14:26 +0000 (10:14 -0700)
committerSteven Wu <stevenwu@apple.com>
Wed, 26 Aug 2020 17:15:00 +0000 (10:15 -0700)
commit34b289b6dbcf1cdb328ab0a13cdedf96701394af
tree7cd30aae8d21f1d90fa8ec66c3b5f59eb9ec6ce3
parent413054400d949ddd15e9bfdcb587502ea0311fcf
[ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab

Instead of computing GUID based on some assumption about symbol mangling
rule from IRName to symbol name, lookup the IRName from all the symtabs
from all the input files to see if there are any matching symbols entry
provides the IRName for GUID computation.

rdar://65853754

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D84803
llvm/lib/LTO/ThinLTOCodeGenerator.cpp
llvm/test/ThinLTO/X86/internalize.ll
llvm/test/ThinLTO/X86/mangled_symbol.ll [new file with mode: 0644]
llvm/test/ThinLTO/X86/weak_resolution.ll
llvm/test/ThinLTO/X86/weak_resolution_single.ll