[clang-tidy][use-internal-linkage]fix false positives for global overloaded operator...
[llvm-project.git] / lld / test / COFF / icf-assoc-order.s
blob45ddc0c6e7f70241901e91232e11530024c8c9a0
1 # REQUIRES: x86
2 # RUN: llvm-mc %s -filetype=obj -triple=x86_64-windows-msvc -o %t.obj
3 # RUN: lld-link %t.obj -export:foo -export:bar -dll -noentry -out:%t.dll -verbose 2>&1 | FileCheck %s
4 # RUN: llvm-readobj --sections %t.dll | FileCheck %s --check-prefix=TEXT
6 # The order of the pdata and xdata sections here shouldn't matter. We should
7 # still replace bar with foo.
9 # CHECK: ICF needed {{.*}} iterations
10 # CHECK: Selected foo
11 # CHECK: Removed bar
13 # We should only have five bytes of text.
14 # TEXT: Name: .text
15 # TEXT-NEXT: Size: 0x5
17 .section .text,"xr",discard,foo
18 .globl foo
19 foo:
20 pushq %rbx
21 pushq %rdi
22 popq %rdi
23 popq %rbx
24 retq
27 .section .pdata,"r",associative,foo
28 .long foo
29 .long 5
30 .long foo_xdata@IMGREL
32 .section .xdata,"r",associative,foo
33 foo_xdata:
34 .long 42
36 .section .text,"xr",discard,bar
37 .globl bar
38 bar:
39 pushq %rbx
40 pushq %rdi
41 popq %rdi
42 popq %rbx
43 retq
45 .section .xdata,"r",associative,bar
46 bar_xdata:
47 .long 42
49 .section .pdata,"r",associative,bar
50 .long bar
51 .long 5
52 .long bar_xdata@IMGREL