mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 03:56:16 +08:00
Currently ICF information is output through stderr if the "--verbose" flag is used. This differs to Gold for example, which uses an explicit flag to output this to stdout. This commit adds the "--print-icf-sections" and "--no-print-icf-sections" flags and changes the output message format for clarity and consistency with "--print-gc-sections". These messages are still output to stderr if using the verbose flag. However to avoid intermingled message output to console, this will not occur when the "--print-icf-sections" flag is used. Existing tests have been modified to expect the new message format from stderr. Patch by Owen Reynolds. Differential Revision: https://reviews.llvm.org/D42375 Reviewers: ruiu, rafael Reviewed by: llvm-svn: 323976
20 lines
357 B
ArmAsm
20 lines
357 B
ArmAsm
# REQUIRES: x86
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
|
|
# RUN: ld.lld %t -o %t2 --icf=all --verbose 2>&1 | FileCheck %s
|
|
|
|
# CHECK-NOT: selected section '.text.f1'
|
|
# CHECK-NOT: selected section '.text.f2'
|
|
|
|
.globl _start, f1, f2
|
|
_start:
|
|
ret
|
|
|
|
.section .text.f1, "ax"
|
|
f1:
|
|
mov $0, %rax
|
|
|
|
.section .text.f2, "awx"
|
|
f2:
|
|
mov $0, %rax
|