blob: 1faae186ddd59c94dc645006f21e2f81850e46b2 [file] [log] [blame]
Reid Spencer3c1b4012007-08-16 07:22:43 +00001; Test that linking two files with the same definition causes an error and
2; that error is printed out.
Dan Gohmanfea1dd02009-08-25 15:38:29 +00003; RUN: llvm-as %s -o %t.one.bc
4; RUN: llvm-as %s -o %t.two.bc
Michael J. Spencer75338092012-04-19 19:27:54 +00005; RUN: not llvm-link %t.one.bc %t.two.bc -o %t.bc |& FileCheck %s
Reid Spencer3c1b4012007-08-16 07:22:43 +00006
Michael J. Spencer75338092012-04-19 19:27:54 +00007; CHECK: symbol multiply defined
Reid Spencer3c1b4012007-08-16 07:22:43 +00008define i32 @bar() {
Michael J. Spencer75338092012-04-19 19:27:54 +00009 ret i32 0
Reid Spencer3c1b4012007-08-16 07:22:43 +000010}