[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / COFF / icf-safe.s
blobc2897e97d5d49c3aa7f923e789b047ca0d5b2ea7
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-win32 %s -o %t1.obj
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-win32 %S/Inputs/icf-safe.s -o %t2.obj
4 # RUN: lld-link /dll /noentry /out:%t.dll /verbose /opt:noref,icf %t1.obj %t2.obj 2>&1 | FileCheck %s
5 # RUN: lld-link /dll /noentry /out:%t.dll /verbose /opt:noref,icf /export:g3 /export:g4 %t1.obj %t2.obj 2>&1 | FileCheck --check-prefix=EXPORT %s
6 # RUN: lld-link /dll /noentry /out:%t.dll /verbose /opt:noref,safeicf %t1.obj %t2.obj 2>&1 | FileCheck %s --check-prefix=SAFEICF
8 # CHECK-NOT: Selected
9 # CHECK: Selected f1
10 # CHECK-NEXT: Removed f2
11 # CHECK-NEXT: Removed f3
12 # CHECK-NEXT: Removed f4
13 # CHECK-NEXT: Selected g3
14 # CHECK-NEXT: Removed g4
15 # CHECK-NOT: {{.}}
17 # EXPORT-NOT: Selected g3
18 # EXPORT-NOT: Selected g4
20 # SAFEICF-NOT: Selected
21 # SAFEICF: Selected f3
22 # SAFEICF-NEXT: Removed f4
23 # SAFEICF-NEXT: Selected g3
24 # SAFEICF-NEXT: Removed g4
25 # SAFEICF-NOT: {{.}}
27 .section .rdata,"dr",one_only,g1
28 .globl g1
29 g1:
30 .byte 1
32 .section .rdata,"dr",one_only,g2
33 .globl g2
34 g2:
35 .byte 1
37 .section .rdata,"dr",one_only,g3
38 .globl g3
39 g3:
40 .byte 2
42 .section .rdata,"dr",one_only,g4
43 .globl g4
44 g4:
45 .byte 2
47 .section .text,"xr",one_only,f1
48 .globl f1
49 f1:
50 nop
52 .section .text,"xr",one_only,f2
53 .globl f2
54 f2:
55 nop
57 .section .text,"xr",one_only,f3
58 .globl f3
59 f3:
60 nop
62 .section .text,"xr",one_only,f4
63 .globl f4
64 f4:
65 nop
67 .addrsig
68 .addrsig_sym g1
69 .addrsig_sym g2
70 .addrsig_sym f1
71 .addrsig_sym f2