Commit Graph

5 Commits

Author SHA1 Message Date
Andrew Ng 39f3f7c08f [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
2021-10-04 11:10:10 +01:00
Fangrui Song 40a9f2251b [ELF] Replace unused output filenames with /dev/null in tests
Post commit review at rLLD335992

llvm-svn: 336129
2018-07-02 17:48:23 +00:00
James Henderson 9c6e2fd5a4 [ELF] Add --print-icf-sections flag
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
2018-02-01 16:00:46 +00:00
Sam Clegg 77c1def71a Use ErrorOS for log messages as well as error
log are also diagnostics so it seems like they should to
the same place as errors and debug messages.

Without this change when I enable --verbose those messages
go to stdout, but when I enable "-mllvm -debug" those messages
go to stderr (because dbgs() goes to stderr by default).

So I end up having to do this a lot:
 lld <args> > output_message 2>&1

Differential Revision: https://reviews.llvm.org/D41033

llvm-svn: 320427
2017-12-11 21:57:31 +00:00
Rui Ueyama ae704a5472 Add --icf=none option.
--icf=none negates --icf=all.

llvm-svn: 310526
2017-08-09 21:32:38 +00:00