gold plugin: Handle gold selecting a linkonce GV when a weak is present.
[oota-llvm.git] / test / tools / gold / linkonce-weak.ll
1 ; RUN: llvm-as %s -o %t.o
2 ; RUN: llvm-as %p/Inputs/linkonce-weak.ll -o %t2.o
3
4 ; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
5 ; RUN:    --plugin-opt=emit-llvm \
6 ; RUN:    -shared %t.o %t2.o -o %t3.o
7 ; RUN: llvm-dis %t3.o -o - | FileCheck %s
8
9 ; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
10 ; RUN:    --plugin-opt=emit-llvm \
11 ; RUN:    -shared %t2.o %t.o -o %t3.o
12 ; RUN: llvm-dis %t3.o -o - | FileCheck %s
13
14 define linkonce_odr void @f() {
15   ret void
16 }
17
18 ; Test that we get a weak_odr regardless of the order of the files
19 ; CHECK: define weak_odr void @f() {