mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Add back functionality removed in r210497.
Instead of asserting, output a message stating that a null pointer was found. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211430 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -287,8 +287,10 @@ void IVUsers::print(raw_ostream &OS, const Module *M) const {
|
||||
OS << ")";
|
||||
}
|
||||
OS << " in ";
|
||||
assert(UI->getUser() != nullptr && "Expected non-null User");
|
||||
UI->getUser()->print(OS);
|
||||
if (UI->getUser())
|
||||
UI->getUser()->print(OS);
|
||||
else
|
||||
OS << "Printing <null> User";
|
||||
OS << '\n';
|
||||
}
|
||||
}
|
||||
|
@@ -45,8 +45,10 @@ public:
|
||||
for (Loop::block_iterator b = L->block_begin(), be = L->block_end();
|
||||
b != be;
|
||||
++b) {
|
||||
assert((*b) != nullptr && "Expecting non-null block");
|
||||
(*b)->print(Out);
|
||||
if (*b)
|
||||
(*b)->print(Out);
|
||||
else
|
||||
Out << "Printing <null> block";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@@ -196,8 +196,10 @@ public:
|
||||
bool runOnRegion(Region *R, RGPassManager &RGM) override {
|
||||
Out << Banner;
|
||||
for (const auto &BB : R->blocks()) {
|
||||
assert(BB != nullptr && "Expecting non-null Block");
|
||||
BB->print(Out);
|
||||
if (BB)
|
||||
BB->print(Out);
|
||||
else
|
||||
Out << "Printing <null> Block";
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user