Changed the fundemental architecture of Operands for Instructions. Now
Operands are maintained as a vector<Use> in the User class, and operator
iterators are provided as before. Getting an operand no longer requires
a virtual function call.
WARNING: getOperand(x) where x >= getNumOperands() will now assert instead
of returning null!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp
index 8e37279..fa2c9c7 100644
--- a/lib/Transforms/Scalar/DCE.cpp
+++ b/lib/Transforms/Scalar/DCE.cpp
@@ -91,7 +91,7 @@
do {
PHINode *PN = (PHINode*)I;
- assert(PN->getOperand(2) == 0 && "PHI node should only have one value!");
+ assert(PN->getNumOperands() == 2 && "PHI node should only have one value!");
Value *V = PN->getOperand(0);
PN->replaceAllUsesWith(V); // Replace PHI node with its single value.