diff options
author | Chris Lattner <sabre@nondot.org> | 2001-12-13 00:45:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-12-13 00:45:40 +0000 |
commit | 9102aee52827790c94051df70c83fe5034bc9ff7 (patch) | |
tree | a2ea1a6ae0f2636509ff332f3f9d0ba0bd1a6777 | |
parent | 481fafe67d8c9eb387a0b3ad5142e455ca943109 (diff) | |
download | external_llvm-9102aee52827790c94051df70c83fe5034bc9ff7.zip external_llvm-9102aee52827790c94051df70c83fe5034bc9ff7.tar.gz external_llvm-9102aee52827790c94051df70c83fe5034bc9ff7.tar.bz2 |
Assertion could never fail because another one would in it's place. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1449 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/ConstantProp.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/ConstantProp.cpp b/lib/Transforms/Scalar/ConstantProp.cpp index 4fb3254..c267d95 100644 --- a/lib/Transforms/Scalar/ConstantProp.cpp +++ b/lib/Transforms/Scalar/ConstantProp.cpp @@ -179,7 +179,7 @@ bool opt::ConstantPropogation::doConstantPropogation(BasicBlock *BB, } else if (PHINode *PN = dyn_cast<PHINode>(Inst)) { // If it's a PHI node and only has one operand // Then replace it directly with that operand. - assert(PN->getOperand(0) && "PHI Node must have at least one operand!"); + assert(PN->getNumOperands() && "PHI Node must have at least one operand!"); if (PN->getNumOperands() == 1) { // If the PHI Node has exactly 1 operand Value *V = PN->getOperand(0); PN->replaceAllUsesWith(V); // Replace all uses of this PHI |