[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Wed Aug 4 01:24:35 PDT 2004
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.236 -> 1.237
---
Log message:
Stop using getValues().
---
Diffs of the changes: (+2 -2)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.236 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.237
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.236 Sun Aug 1 14:42:59 2004
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Aug 4 03:24:25 2004
@@ -2947,7 +2947,7 @@
assert(CU->getValue() < STy->getNumElements() &&
"Struct index out of range!");
if (ConstantStruct *CS = dyn_cast<ConstantStruct>(C)) {
- C = cast<Constant>(CS->getValues()[CU->getValue()]);
+ C = CS->getOperand(CU->getValue());
} else if (isa<ConstantAggregateZero>(C)) {
C = Constant::getNullValue(STy->getElementType(CU->getValue()));
} else {
@@ -2957,7 +2957,7 @@
const ArrayType *ATy = cast<ArrayType>(*I);
if ((uint64_t)CI->getRawValue() >= ATy->getNumElements()) return 0;
if (ConstantArray *CA = dyn_cast<ConstantArray>(C))
- C = cast<Constant>(CA->getValues()[CI->getRawValue()]);
+ C = CA->getOperand(CI->getRawValue());
else if (isa<ConstantAggregateZero>(C))
C = Constant::getNullValue(ATy->getElementType());
else
More information about the llvm-commits
mailing list