summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-12-11 22:10:29 +0000
committerChris Lattner <sabre@nondot.org>2004-12-11 22:10:29 +0000
commit8d0b1b2a825593b96fc88ef78361acdaebf6ad72 (patch)
treec0983bed5752f260dd992b923f7f02e58f22aa6c
parent72daaa46eb8e2835434b9a097a77d1fe93e733df (diff)
downloadbcm5719-llvm-8d0b1b2a825593b96fc88ef78361acdaebf6ad72.tar.gz
bcm5719-llvm-8d0b1b2a825593b96fc88ef78361acdaebf6ad72.zip
Check in the file I forgot last night, to solve all of the crashes in every
test in the suite. :( llvm-svn: 18804
-rw-r--r--llvm/lib/VMCore/BasicBlock.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/BasicBlock.cpp b/llvm/lib/VMCore/BasicBlock.cpp
index 2e8560cb657..b399c552210 100644
--- a/llvm/lib/VMCore/BasicBlock.cpp
+++ b/llvm/lib/VMCore/BasicBlock.cpp
@@ -138,6 +138,7 @@ void BasicBlock::dropAllReferences() {
void BasicBlock::removePredecessor(BasicBlock *Pred) {
assert(find(pred_begin(this), pred_end(this), Pred) != pred_end(this) &&
"removePredecessor: BB is not a predecessor!");
+ if (InstList.empty()) return;
PHINode *APN = dyn_cast<PHINode>(&front());
if (!APN) return; // Quick exit.
OpenPOWER on IntegriCloud