From 5ba315dbbe7b8f6596c5d1bb437aab7da4d396c1 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 11 Dec 2004 22:10:29 +0000 Subject: [PATCH] Check in the file I forgot last night, to solve all of the crashes in every test in the suite. :( llvm-svn: 18804 --- lib/VMCore/BasicBlock.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp index 2e8560cb657..b399c552210 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(&front()); if (!APN) return; // Quick exit.