Recommit r256952 "Filtering IR printing for print-after-all/print-before-all"
[oota-llvm.git] / lib / Analysis / CallGraphSCCPass.cpp
index 07b389a2a1393913d275ca93cc25dce8b042adf0..6dd1d0a066b6bef30de55134dbc5650d50e2432f 100644 (file)
@@ -612,9 +612,10 @@ namespace {
     bool runOnSCC(CallGraphSCC &SCC) override {
       Out << Banner;
       for (CallGraphNode *CGN : SCC) {
-        if (CGN->getFunction())
-          CGN->getFunction()->print(Out);
-        else
+        if (CGN->getFunction()) {
+          if (isFunctionInPrintList(CGN->getFunction()->getName()))
+            CGN->getFunction()->print(Out);
+        } else
           Out << "\nPrinting <null> Function\n";
       }
       return false;