[llvm-commits] CVS: llvm/lib/VMCore/BasicBlock.cpp

Chris Lattner lattner at cs.uiuc.edu
Sat Dec 11 14:10:44 PST 2004



Changes in directory llvm/lib/VMCore:

BasicBlock.cpp updated: 1.50 -> 1.51
---
Log message:

Check in the file I forgot last night, to solve all of the crashes in every
test in the suite.  :(


---
Diffs of the changes:  (+1 -0)

Index: llvm/lib/VMCore/BasicBlock.cpp
diff -u llvm/lib/VMCore/BasicBlock.cpp:1.50 llvm/lib/VMCore/BasicBlock.cpp:1.51
--- llvm/lib/VMCore/BasicBlock.cpp:1.50	Mon Oct 11 17:21:39 2004
+++ llvm/lib/VMCore/BasicBlock.cpp	Sat Dec 11 16:10:29 2004
@@ -138,6 +138,7 @@
 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.
 






More information about the llvm-commits mailing list