<div dir="rtl"><div dir="ltr">Added test in r305213, thanks!</div></div><br><div class="gmail_quote"><div dir="rtl">‫בתאריך יום ב׳, 12 ביוני 2017 ב-18:59 מאת ‪David Blaikie‬‏ <‪<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>‬‏>:‬<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I would've guessed this would be testable? Is it not?<br><br><div class="gmail_quote"></div></div><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Sun, Jun 11, 2017 at 1:30 AM Yaron Keren via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div></div></div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">yaron.keren created this revision.<br>
<br>
Address <a href="https://bugs.llvm.org/show_bug.cgi?id=32207" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=32207</a>, banner does not print more than once following r292442 by making BannerPrinted local and skipping banner for function declarations.<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D34086" rel="noreferrer" target="_blank">https://reviews.llvm.org/D34086</a><br>
<br>
Files:<br>
  lib/Analysis/CallGraphSCCPass.cpp<br>
<br>
<br>
Index: lib/Analysis/CallGraphSCCPass.cpp<br>
===================================================================<br>
--- lib/Analysis/CallGraphSCCPass.cpp<br>
+++ lib/Analysis/CallGraphSCCPass.cpp<br>
@@ -608,18 +608,18 @@<br>
     }<br>
<br>
     bool runOnSCC(CallGraphSCC &SCC) override {<br>
+      bool BannerPrinted = false;<br>
       auto PrintBannerOnce = [&] () {<br>
-        static bool BannerPrinted = false;<br>
         if (BannerPrinted)<br>
           return;<br>
         Out << Banner;<br>
         BannerPrinted = true;<br>
         };<br>
       for (CallGraphNode *CGN : SCC) {<br>
-        if (CGN->getFunction()) {<br>
-          if (isFunctionInPrintList(CGN->getFunction()->getName())) {<br>
+        if (Function *F = CGN->getFunction()) {<br>
+          if (!F->isDeclaration() && isFunctionInPrintList(F->getName())) {<br>
             PrintBannerOnce();<br>
-            CGN->getFunction()->print(Out);<br>
+            F->print(Out);<br>
           }<br>
         } else if (llvm::isFunctionInPrintList("*")) {<br>
           PrintBannerOnce();<br>
<br>
<br></blockquote></div></div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>
</blockquote></div>