projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
481fafe
)
Assertion could never fail because another one would in it's place. :)
author
Chris Lattner
<sabre@nondot.org>
Thu, 13 Dec 2001 00:45:40 +0000
(
00:45
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 13 Dec 2001 00:45:40 +0000
(
00:45
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1449
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/ConstantProp.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/ConstantProp.cpp
b/lib/Transforms/Scalar/ConstantProp.cpp
index 4fb325485302e204732b6a9166a352a41f1d8e85..c267d95ea49f97c58dc6825ead196569dc99c9bc 100644
(file)
--- 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->get
Operand(0
) && "PHI Node must have at least one operand!");
+ assert(PN->get
NumOperands(
) && "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