[clang-tidy][modernize-use-starts-ends-with] Fix operator rewriting false negative...
[llvm-project.git] / lld / test / ELF / conflict.s
blob66a7f3912dbea369b6a2685f0912925533f45dc0
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
4 # RUN: not ld.lld %t1.o %t1.o -o /dev/null 2>&1 | FileCheck -check-prefix=DEMANGLE %s
6 # DEMANGLE: duplicate symbol: mul(double, double)
7 # DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
8 # DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
9 # DEMANGLE: duplicate symbol: foo
10 # DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
11 # DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
13 # RUN: not ld.lld %t1.o %t1.o -o /dev/null --no-demangle 2>&1 | \
14 # RUN: FileCheck -check-prefix=NO_DEMANGLE %s
16 # NO_DEMANGLE: duplicate symbol: _Z3muldd
17 # NO_DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
18 # NO_DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
19 # NO_DEMANGLE: duplicate symbol: foo
20 # NO_DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
21 # NO_DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
23 # RUN: not ld.lld %t1.o %t1.o -o /dev/null --demangle --no-demangle 2>&1 | \
24 # RUN: FileCheck -check-prefix=NO_DEMANGLE %s
25 # RUN: not ld.lld %t1.o %t1.o -o /dev/null --no-demangle --demangle 2>&1 | \
26 # RUN: FileCheck -check-prefix=DEMANGLE %s
28 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/conflict.s -o %t2.o
29 # RUN: rm -f %t3.a
30 # RUN: llvm-ar rcs %t3.a %t2.o
31 # RUN: not ld.lld %t1.o %t3.a -u baz -o /dev/null 2>&1 | FileCheck -check-prefix=ARCHIVE %s
33 # ARCHIVE: duplicate symbol: foo
34 # ARCHIVE-NEXT: >>> defined at {{.*}}:(.text+0x0)
35 # ARCHIVE-NEXT: >>> defined at {{.*}}:(.text+0x0) in archive {{.*}}.a
37 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/conflict-debug.s -o %t-dbg.o
38 # RUN: not ld.lld %t-dbg.o %t-dbg.o -o /dev/null 2>&1 | FileCheck -check-prefix=DBGINFO %s
40 # DBGINFO: duplicate symbol: zed
41 # DBGINFO-NEXT: >>> defined at conflict-debug.s:4
42 # DBGINFO-NEXT: >>> {{.*}}:(.text+0x0)
43 # DBGINFO-NEXT: >>> defined at conflict-debug.s:4
44 # DBGINFO-NEXT: >>> {{.*}}:(.text+0x0)
46 .globl _Z3muldd, foo
47 _Z3muldd:
48 foo:
49 mov $60, %rax
50 mov $42, %rdi
51 syscall