llvm.org GIT mirror llvm / 07c3753
Unify and update link-messages.ll and redefinition.ll. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220968 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 5 years ago
3 changed file(s) with 5 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
0 define void @foo(i32 %x) { ret void }
+0
-10
test/Linker/link-messages.ll less more
None ; Test that linking two files with the same definition causes an error and
1 ; that error is printed out.
2 ; RUN: llvm-as %s -o %t.one.bc
3 ; RUN: llvm-as %s -o %t.two.bc
4 ; RUN: not llvm-link %t.one.bc %t.two.bc -o %t.bc 2>&1 | FileCheck %s
5
6 ; CHECK: symbol multiply defined
7 define i32 @bar() {
8 ret i32 0
9 }
None ; Test linking two functions with different prototypes and two globals
0 ; Test linking two functions with different prototypes and two globals
11 ; in different modules.
2 ; RUN: llvm-as %s -o %t.foo1.bc
3 ; RUN: llvm-as %s -o %t.foo2.bc
4 ; RUN: echo "define void @foo(i32 %x) { ret void }" | llvm-as -o %t.foo3.bc
5 ; RUN: not llvm-link %t.foo1.bc %t.foo2.bc -o %t.bc 2>&1 | FileCheck %s
6 ; RUN: not llvm-link %t.foo1.bc %t.foo3.bc -o %t.bc 2>&1 | FileCheck %s
7 ; CHECK: symbol multiply defined
2 ; RUN: not llvm-link %s %s -o %t.bc 2>&1 | FileCheck %s
3 ; RUN: not llvm-link %s %S/Inputs/redefinition.ll -o %t.bc 2>&1 | FileCheck %s
4 ; CHECK: ERROR: Linking globals named 'foo': symbol multiply defined!
85 define void @foo() { ret void }