Skip to content

Commit 39f3f7c

Browse files
committed
[ELF][test] Fix several LLD ICF tests
A number of the ICF tests were not updated to use --print-icf-sections instead of --verbose and various '-NOT' checks were not updated to the latest output format of --print-icf-sections. Because these are all 'negative' tests, these issues have gone unnoticed. Differential Revision: https://reviews.llvm.org/D110353
1 parent 255a690 commit 39f3f7c

File tree

6 files changed

+6
-23
lines changed

6 files changed

+6
-23
lines changed

lld/test/ELF/icf-non-mergeable.s

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \
99
// RUN: %p/Inputs/icf-non-mergeable.s -o %t2
1010

11-
// RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --verbose 2>&1 | FileCheck %s
12-
13-
// CHECK-NOT: selected section '.text.f1'
14-
// CHECK-NOT: removing identical section '.text.f2'
11+
// RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --print-icf-sections | count 0
1512

1613
.globl _start, f1, f2, d1, d2
1714
_start:

lld/test/ELF/icf-none.s

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# REQUIRES: x86
22

33
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
4-
# RUN: ld.lld %t -o /dev/null --icf=all --icf=none --verbose 2>&1 | FileCheck %s
5-
6-
# CHECK-NOT: selected section '.text.f1'
4+
# RUN: ld.lld %t -o /dev/null --icf=all --icf=none --print-icf-sections | count 0
75

86
.globl _start, f1, f2
97
_start:

lld/test/ELF/icf3.s

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22

33
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
44
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/icf2.s -o %t2
5-
# RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
6-
7-
# CHECK-NOT: selected section '.text.f1' from file
8-
# CHECK-NOT: selected section '.text.f2' from file
5+
# RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --print-icf-sections | count 0
96

107
.globl _start, f1, f2
118
_start:

lld/test/ELF/icf4.s

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
# REQUIRES: x86
22

33
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
4-
# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
5-
6-
# CHECK-NOT: selected section '.text.f1'
7-
# CHECK-NOT: selected section '.text.f2'
4+
# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections | count 0
85

96
.globl _start, f1, f2
107
_start:

lld/test/ELF/icf5.s

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
# REQUIRES: x86
22

33
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
4-
# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
5-
6-
# CHECK-NOT: selected section '.text.f1'
7-
# CHECK-NOT: selected section '.text.f2'
4+
# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections | count 0
85

96
.globl _start, f1, f2
107
_start:

lld/test/ELF/icf6.s

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
# REQUIRES: x86
22

33
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
4-
# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
5-
6-
# CHECK-NOT: selected section '.text.f1'
7-
# CHECK-NOT: selected section '.text.f2'
4+
# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections | count 0
85

96
.globl _start, f1, f2
107
_start:

0 commit comments

Comments
 (0)