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. |
| 3 | ; RUN: llvm-as %s -o %t.one.bc -f |
| 4 | ; RUN: llvm-as %s -o %t.two.bc -f |
Dan Gohman | 83935ac | 2007-12-11 15:50:23 +0000 | [diff] [blame^] | 5 | ; RUN: not llvm-ld -disable-opt -link-as-library %t.one.bc %t.two.bc \ |
Reid Spencer | 3c1b401 | 2007-08-16 07:22:43 +0000 | [diff] [blame] | 6 | ; RUN: -o %t.bc 2>%t.err |
| 7 | ; RUN: grep "Function is already defined" %t.err |
| 8 | |
| 9 | define i32 @bar() { |
| 10 | ret i32 0 |
| 11 | } |