[llvm-commits] CVS: llvm/lib/Transforms/Scalar/SCCP.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Wed Aug 4 01:28:44 PDT 2004
Changes in directory llvm/lib/Transforms/Scalar:
SCCP.cpp updated: 1.98 -> 1.99
---
Log message:
Stop using getValues().
---
Diffs of the changes: (+4 -4)
Index: llvm/lib/Transforms/Scalar/SCCP.cpp
diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.98 llvm/lib/Transforms/Scalar/SCCP.cpp:1.99
--- llvm/lib/Transforms/Scalar/SCCP.cpp:1.98 Sun Jul 18 03:34:52 2004
+++ llvm/lib/Transforms/Scalar/SCCP.cpp Wed Aug 4 03:28:33 2004
@@ -753,13 +753,13 @@
if (ConstantUInt *CU = dyn_cast<ConstantUInt>(CE->getOperand(i))) {
ConstantStruct *CS = dyn_cast<ConstantStruct>(C);
if (CS == 0) return 0;
- if (CU->getValue() >= CS->getValues().size()) return 0;
- C = cast<Constant>(CS->getValues()[CU->getValue()]);
+ if (CU->getValue() >= CS->getNumOperands()) return 0;
+ C = CS->getOperand(CU->getValue());
} else if (ConstantSInt *CS = dyn_cast<ConstantSInt>(CE->getOperand(i))) {
ConstantArray *CA = dyn_cast<ConstantArray>(C);
if (CA == 0) return 0;
- if ((uint64_t)CS->getValue() >= CA->getValues().size()) return 0;
- C = cast<Constant>(CA->getValues()[CS->getValue()]);
+ if ((uint64_t)CS->getValue() >= CA->getNumOperands()) return 0;
+ C = CA->getOperand(CS->getValue());
} else
return 0;
return C;
More information about the llvm-commits
mailing list