summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2014-06-21 02:43:02 +0000
committerRichard Trieu <rtrieu@google.com>2014-06-21 02:43:02 +0000
commitc1485223a688abe8a86e27529e86bd0fa885ceeb (patch)
tree01e75c881a2bfd892b2d1c06ab1bd8ff014db96c /llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
parent9eaae3d8f67a7f85c58888b2074854f63266bfac (diff)
downloadbcm5719-llvm-c1485223a688abe8a86e27529e86bd0fa885ceeb.tar.gz
bcm5719-llvm-c1485223a688abe8a86e27529e86bd0fa885ceeb.zip
Add back functionality removed in r210497.
Instead of asserting, output a message stating that a null pointer was found. llvm-svn: 211430
Diffstat (limited to 'llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp')
-rw-r--r--llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
index 0d9d0ef842c..730eb7156d1 100644
--- a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
@@ -603,8 +603,10 @@ namespace {
bool runOnSCC(CallGraphSCC &SCC) override {
Out << Banner;
for (CallGraphSCC::iterator I = SCC.begin(), E = SCC.end(); I != E; ++I) {
- assert((*I)->getFunction() && "Expecting non-null Function");
- (*I)->getFunction()->print(Out);
+ if ((*I)->getFunction())
+ (*I)->getFunction()->print(Out);
+ else
+ Out << "Printing <null> Function";
}
return false;
}
OpenPOWER on IntegriCloud