llvm/test/Linker/Inputs/pr27044.ll
Rafael Espindola c0521dd4a2 Fix another case where we were unconditionally linking linkonce GVs.
With this I think that now llvm-link,  lld and the gold plugin should
agree on which symbol is kept.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264292 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 15:23:01 +00:00

20 lines
280 B
LLVM

$foo = comdat any
$bar = comdat any
define linkonce_odr i32 @f1() comdat($foo) {
ret i32 1
}
define void @f2() comdat($foo) {
call i32 @g2()
ret void
}
define linkonce_odr i32 @g1() comdat($bar) {
ret i32 1
}
define linkonce_odr i32 @g2() comdat($bar) {
ret i32 1
}