Removing an "if (!this)" check from two print methods. The condition will
[oota-llvm.git] / lib / Analysis / IPA / CallGraphSCCPass.cpp
index bfab744d479f857d3ae541b6895c508e221d5645..0d9d0ef842c641d699b7829391d9654de6a91d31 100644 (file)
@@ -602,8 +602,10 @@ namespace {
 
     bool runOnSCC(CallGraphSCC &SCC) override {
       Out << Banner;
-      for (CallGraphSCC::iterator I = SCC.begin(), E = SCC.end(); I != E; ++I)
+      for (CallGraphSCC::iterator I = SCC.begin(), E = SCC.end(); I != E; ++I) {
+        assert((*I)->getFunction() && "Expecting non-null Function");
         (*I)->getFunction()->print(Out);
+      }
       return false;
     }
   };