Reid Spencer | 3c1b401 | 2007-08-16 07:22:43 +0000 | [diff] [blame] | 1 | ; Test that linking two files with the same definition causes an error and |
| 2 | ; that error is printed out. |
Dan Gohman | fea1dd0 | 2009-08-25 15:38:29 +0000 | [diff] [blame] | 3 | ; RUN: llvm-as %s -o %t.one.bc |
| 4 | ; RUN: llvm-as %s -o %t.two.bc |
Michael J. Spencer | 7533809 | 2012-04-19 19:27:54 +0000 | [diff] [blame^] | 5 | ; RUN: not llvm-link %t.one.bc %t.two.bc -o %t.bc |& FileCheck %s |
Reid Spencer | 3c1b401 | 2007-08-16 07:22:43 +0000 | [diff] [blame] | 6 | |
Michael J. Spencer | 7533809 | 2012-04-19 19:27:54 +0000 | [diff] [blame^] | 7 | ; CHECK: symbol multiply defined |
Reid Spencer | 3c1b401 | 2007-08-16 07:22:43 +0000 | [diff] [blame] | 8 | define i32 @bar() { |
Michael J. Spencer | 7533809 | 2012-04-19 19:27:54 +0000 | [diff] [blame^] | 9 | ret i32 0 |
Reid Spencer | 3c1b401 | 2007-08-16 07:22:43 +0000 | [diff] [blame] | 10 | } |