llvm-project/llvm/test/LTO/Resolution/X86
Davide Italiano 6a5fbe52fa [LTO] Fix the interaction between linker redefined symbols and ThinLTO
This is the same as r304719 but for ThinLTO.
The substantial difference is that in this case we don't have
whole visibility, just the summary.
In the LTO case, when we got the resolution for the input file we
could just see if the linker told us whether a symbol was linker
redefined (using --wrap or --defsym) and switch the linkage directly
for the GV.

Here, we have the summary. So, we record that the linkage changed
from <whatever it was> to $weakany to prevent IPOs across this symbol
boundaries and actually just switch the linkage at FunctionImport time.

This patch should also fixes the lld bits (as all the scaffolding for
communicating if a symbol is linker redefined should be there & should
be the same), but I'll make sure to add some tests there as well.

Fixes PR33192.

Differential Revision:  https://reviews.llvm.org/D35064

llvm-svn: 307303
2017-07-06 19:58:26 +00:00
..
Inputs [LTO] Remove values from non-prevailing comdats 2017-06-30 14:03:24 +00:00
alias.ll llvm-lto2: Move the LTO::run() action behind a subcommand. 2017-04-11 18:12:00 +00:00
asm-output.ll llvm-lto2: Move the LTO::run() action behind a subcommand. 2017-04-11 18:12:00 +00:00
comdat-mixed-lto.ll [LTO] Remove values from non-prevailing comdats 2017-06-30 14:03:24 +00:00
comdat.ll llvm-lto2: Move the LTO::run() action behind a subcommand. 2017-04-11 18:12:00 +00:00
common2.ll llvm-lto2: Move the LTO::run() action behind a subcommand. 2017-04-11 18:12:00 +00:00
commons.ll llvm-lto2: Move the LTO::run() action behind a subcommand. 2017-04-11 18:12:00 +00:00
dead-strip-fulllto.ll Apply summary-based dead stripping to regular LTO modules with summaries. 2017-06-15 17:26:13 +00:00
diagnostic-handler-remarks-with-hotness.ll llvm-lto2: Move the LTO::run() action behind a subcommand. 2017-04-11 18:12:00 +00:00
diagnostic-handler-remarks.ll llvm-lto2: Move the LTO::run() action behind a subcommand. 2017-04-11 18:12:00 +00:00
empty-bitcode.test llvm-lto2: Move the LTO::run() action behind a subcommand. 2017-04-11 18:12:00 +00:00
ifunc.ll Add support for handling ifuncs to GlobalValue::getBaseObject 2017-05-15 18:28:29 +00:00
intrinsic.ll llvm-lto2: Move the LTO::run() action behind a subcommand. 2017-04-11 18:12:00 +00:00
link-odr-availextern.ll llvm-lto2: Move the LTO::run() action behind a subcommand. 2017-04-11 18:12:00 +00:00
linker-redef-thin.ll [LTO] Fix the interaction between linker redefined symbols and ThinLTO 2017-07-06 19:58:26 +00:00
linker-redef.ll Symbols re-defined with -wrap and -defsym need to be excluded from inter- 2017-06-05 16:24:25 +00:00
linkonce.ll LTO: Do summary-based prevailing symbol resolution at --lto-O0. 2017-05-25 23:40:11 +00:00
lit.local.cfg Restore "Resolution-based LTO API." 2016-08-11 14:58:12 +00:00
lowertypetests.ll llvm-lto2: Move the LTO::run() action behind a subcommand. 2017-04-11 18:12:00 +00:00
mixed_lto.ll llvm-lto2: Move the LTO::run() action behind a subcommand. 2017-04-11 18:12:00 +00:00
mod-asm-used.ll LTO: Mark undefined module asm symbols as used. 2017-04-26 17:53:39 +00:00
multi-thinlto.ll llvm-lto2: Move the LTO::run() action behind a subcommand. 2017-04-11 18:12:00 +00:00
symtab-elf.ll IR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata. 2017-06-12 20:10:48 +00:00
symtab.ll IR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata. 2017-06-12 20:10:48 +00:00
type-checked-load.ll PMB: Run the whole-program-devirt pass during LTO at --lto-O0. 2017-05-26 18:27:13 +00:00