aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/BasicBlock.cpp
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
commitf23586c7efe615d061c00c24cf62f03f7962776f (patch)
treeb70577c001af344d5216100bb320924f439d2f6d /lib/VMCore/BasicBlock.cpp
parentb3a86a6d49234475a7f697648a0fb23e51cf64a2 (diff)
Check in the file I forgot last night, to solve all of the crashes in every
test in the suite. :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18804 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/BasicBlock.cpp')
-rw-r--r--lib/VMCore/BasicBlock.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp
index 2e8560cb65..b399c55221 100644
--- a/lib/VMCore/BasicBlock.cpp
+++ b/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.