From f23586c7efe615d061c00c24cf62f03f7962776f 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. :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18804 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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. -- 2.34.1