[llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Mon May 17 16:16:04 PDT 2004
Changes in directory llvm/lib/VMCore:
Verifier.cpp updated: 1.97 -> 1.98
---
Log message:
Fold two assertions with backwards error messages into one with a
correct error message.
---
Diffs of the changes: (+3 -6)
Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.97 llvm/lib/VMCore/Verifier.cpp:1.98
--- llvm/lib/VMCore/Verifier.cpp:1.97 Tue May 4 16:46:05 2004
+++ llvm/lib/VMCore/Verifier.cpp Mon May 17 16:15:18 2004
@@ -303,12 +303,9 @@
Assert1(PN->getNumIncomingValues() != 0,
"PHI nodes must have at least one entry. If the block is dead, "
"the PHI should be removed!", PN);
- Assert1(PN->getNumIncomingValues() >= Preds.size(),
- "PHINode has more entries than the basic block has predecessors!",
- PN);
- Assert1(PN->getNumIncomingValues() <= Preds.size(),
- "PHINode has less entries than the basic block has predecessors!",
- PN);
+ Assert1(PN->getNumIncomingValues() == Preds.size(),
+ "PHINode should have one entry for each predecessor of its "
+ "parent basic block!", PN);
// Get and sort all incoming values in the PHI node...
std::vector<std::pair<BasicBlock*, Value*> > Values;
More information about the llvm-commits
mailing list