[PATCH] D42375: Add --print-icf flag
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 22 11:59:13 PST 2018
ruiu added inline comments.
================
Comment at: ELF/Driver.cpp:647
+ Config->PrintIcf =
+ Args.hasFlag (OPT_print_icf, OPT_no_print_icf, false);
Config->PrintGcSections =
----------------
`hasFlag (` -> `hasFlag(`
================
Comment at: ELF/ICF.cpp:436-440
+ if (Config->PrintIcf) {
+ message(SectionMessage);
+ } else {
+ log(SectionMessage);
+ }
----------------
Can you define this function
static void print(const Twine &S) {
if (Config->PrintIcf)
message(S);
else
log(S);
}
and use it?
https://reviews.llvm.org/D42375
More information about the llvm-commits
mailing list