From 2fea9ade5593b146983f5674f6f74e917c55877b Mon Sep 17 00:00:00 2001 From: Brian Gaeke Date: Mon, 17 May 2004 21:15:18 +0000 Subject: [PATCH] Fold two assertions with backwards error messages into one with a correct error message. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13590 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Verifier.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 171484133b9..dfd13c9256f 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -303,12 +303,9 @@ void Verifier::visitBasicBlock(BasicBlock &BB) { 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 > Values;