Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / invalid / duplicate-symbol.s
blobe469835e43044d11991fd25c9089dc222076053c
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t-dup.o
4 # RUN: not %lld -dylib -o /dev/null %t-dup.o %t.o 2>&1 | FileCheck %s -DNAME=__ZN1a1bL3fooE -DFILE_1=%t-dup.o -DFILE_2=%t.o
5 # RUN: not %lld -dylib -o /dev/null %t.o %t.o 2>&1 | FileCheck %s -DNAME=__ZN1a1bL3fooE -DFILE_1=%t.o -DFILE_2=%t.o
7 # RUN: not %lld -dylib -demangle -o /dev/null %t-dup.o %t.o 2>&1 | FileCheck %s -DNAME="a::b::foo" -DFILE_1=%t-dup.o -DFILE_2=%t.o
8 # RUN: not %lld -dylib -demangle -o /dev/null %t.o %t.o 2>&1 | FileCheck %s -DNAME="a::b::foo" -DFILE_1=%t.o -DFILE_2=%t.o
10 # CHECK: error: duplicate symbol: [[NAME]]
11 # CHECK-NEXT: >>> defined in [[FILE_1]]
12 # CHECK-NEXT: >>> defined in [[FILE_2]]
14 .text
15 .global __ZN1a1bL3fooE
16 __ZN1a1bL3fooE:
17 ret