<div dir="ltr">Hi Rafael,<div><br></div><div>I'd like some clarification. Currently either "log()" or "message()" will be called with the same calculated message, so moving this to inside "print()" would not change things.  I changed the format of the "log()" output to be consistent with "message()",  are you suggesting that the "log()" message should retain the old format?</div><div><br></div><div>Thanks,</div><div><br></div><div>Owen</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 23, 2018 at 6:15 PM, Rafael Avila de Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Owen Reynolds via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> writes:<br>
<br>
<br>
</span>> +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t<br>
> +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/inputs/print-icf.s -o %t1<br>
> +# RUN: ld.lld %t %t1 -o %t2 --icf=all --print-icf-sections | FileCheck %s<br>
> +# RUN: ld.lld %t %t1 -o %t2 --icf=all --no-print-icf-sections --print-icf-sections | FileCheck %s<br>
> +# RUN: ld.lld %t %t1 -o %t2 --icf=all --print-icf-sections --no-print-icf-sections | not FileCheck %s<br>
<br>
Running "not FileCheck" seems pretty brittle. You should probably use<br>
FileCheck --check-prefix=SOMETHING and add SOMETHING-NOT:...<br>
<br>
> -    log("selected " + Sections[Begin]->Name);<br>
> +    std::string SectionMessage = "selected section '" +<br>
> +                                 Sections[Begin]->Name.str() + "' from file '" +<br>
> +                                 Sections[Begin]->File-><wbr>getName().str() + "'";<br>
> +    print(SectionMessage);<br>
<br>
This computes the message even when not printing anything. Please pass<br>
section to print and only compute the message if we are going to print<br>
it.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div>