Index: lld/test/ELF/icf-non-mergeable.s =================================================================== --- lld/test/ELF/icf-non-mergeable.s +++ lld/test/ELF/icf-non-mergeable.s @@ -8,10 +8,11 @@ // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \ // RUN: %p/Inputs/icf-non-mergeable.s -o %t2 -// RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --verbose 2>&1 | FileCheck %s +// RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s -// CHECK-NOT: selected section '.text.f1' -// CHECK-NOT: removing identical section '.text.f2' +// Check that sections have not been merged. +// CHECK-NOT: selected section {{.*}}:(.text.f1) +// CHECK-NOT: selected section {{.*}}:(.text.f2) .globl _start, f1, f2, d1, d2 _start: Index: lld/test/ELF/icf-none.s =================================================================== --- lld/test/ELF/icf-none.s +++ lld/test/ELF/icf-none.s @@ -1,9 +1,11 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t -# RUN: ld.lld %t -o /dev/null --icf=all --icf=none --verbose 2>&1 | FileCheck %s +# RUN: ld.lld %t -o /dev/null --icf=all --icf=none --print-icf-sections 2>&1 | FileCheck -allow-empty %s -# CHECK-NOT: selected section '.text.f1' +# Check that sections have not been merged. +# CHECK-NOT: selected section {{.*}}:(.text.f1) +# CHECK-NOT: selected section {{.*}}:(.text.f2) .globl _start, f1, f2 _start: Index: lld/test/ELF/icf3.s =================================================================== --- lld/test/ELF/icf3.s +++ lld/test/ELF/icf3.s @@ -4,8 +4,9 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/icf2.s -o %t2 # RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s -# CHECK-NOT: selected section '.text.f1' from file -# CHECK-NOT: selected section '.text.f2' from file +# Check that sections have not been merged. +# CHECK-NOT: selected section {{.*}}:(.text.f1) +# CHECK-NOT: selected section {{.*}}:(.text.f2) .globl _start, f1, f2 _start: Index: lld/test/ELF/icf4.s =================================================================== --- lld/test/ELF/icf4.s +++ lld/test/ELF/icf4.s @@ -3,8 +3,9 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t # RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s -# CHECK-NOT: selected section '.text.f1' -# CHECK-NOT: selected section '.text.f2' +# Check that sections have not been merged. +# CHECK-NOT: selected section {{.*}}:(.text.f1) +# CHECK-NOT: selected section {{.*}}:(.text.f2) .globl _start, f1, f2 _start: Index: lld/test/ELF/icf5.s =================================================================== --- lld/test/ELF/icf5.s +++ lld/test/ELF/icf5.s @@ -3,8 +3,9 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t # RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s -# CHECK-NOT: selected section '.text.f1' -# CHECK-NOT: selected section '.text.f2' +# Check that sections have not been merged. +# CHECK-NOT: selected section {{.*}}:(.text.f1) +# CHECK-NOT: selected section {{.*}}:(.text.f2) .globl _start, f1, f2 _start: Index: lld/test/ELF/icf6.s =================================================================== --- lld/test/ELF/icf6.s +++ lld/test/ELF/icf6.s @@ -3,8 +3,9 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t # RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s -# CHECK-NOT: selected section '.text.f1' -# CHECK-NOT: selected section '.text.f2' +# Check that sections have not been merged. +# CHECK-NOT: selected section {{.*}}:(.init) +# CHECK-NOT: selected section {{.*}}:(.fini) .globl _start, f1, f2 _start: