2007-08-16 15:22:43 +08:00
|
|
|
; Test that linking two files with the same definition causes an error and
|
|
|
|
; that error is printed out.
|
2009-08-25 23:38:29 +08:00
|
|
|
; RUN: llvm-as %s -o %t.one.bc
|
|
|
|
; RUN: llvm-as %s -o %t.two.bc
|
2007-12-11 23:50:23 +08:00
|
|
|
; RUN: not llvm-ld -disable-opt -link-as-library %t.one.bc %t.two.bc \
|
2007-08-16 15:22:43 +08:00
|
|
|
; RUN: -o %t.bc 2>%t.err
|
2008-07-14 15:23:24 +08:00
|
|
|
; RUN: grep "symbol multiply defined" %t.err
|
2007-08-16 15:22:43 +08:00
|
|
|
|
|
|
|
define i32 @bar() {
|
|
|
|
ret i32 0
|
|
|
|
}
|