summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/ConstantProp.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-12-13 00:45:40 +0000
committerChris Lattner <sabre@nondot.org>2001-12-13 00:45:40 +0000
commitf5c6f65e7f461530b5d6e7f6efa80d5e84a046a9 (patch)
treea90d727285c1954eb8eae4390179efd043775a21 /llvm/lib/Transforms/Scalar/ConstantProp.cpp
parentcdbcb1fd17192cb74c294d0a809a7f691cff6a3c (diff)
downloadbcm5719-llvm-f5c6f65e7f461530b5d6e7f6efa80d5e84a046a9.tar.gz
bcm5719-llvm-f5c6f65e7f461530b5d6e7f6efa80d5e84a046a9.zip
Assertion could never fail because another one would in it's place. :)
llvm-svn: 1449
Diffstat (limited to 'llvm/lib/Transforms/Scalar/ConstantProp.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/ConstantProp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/ConstantProp.cpp b/llvm/lib/Transforms/Scalar/ConstantProp.cpp
index 4fb32548530..c267d95ea49 100644
--- a/llvm/lib/Transforms/Scalar/ConstantProp.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud