summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-08-04 08:44:43 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-08-04 08:44:43 +0000
commit832437255db5bf10bc2275c643273b0d67e29bdf (patch)
tree70bc928561df1fb1c6587e826b3e0022d7c0ac22 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp
parenta6241aed38eaf4805653a3cc5c89c1a13bd0339d (diff)
downloadbcm5719-llvm-832437255db5bf10bc2275c643273b0d67e29bdf.tar.gz
bcm5719-llvm-832437255db5bf10bc2275c643273b0d67e29bdf.zip
Stop using getValues().
llvm-svn: 15487
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 747abc2f5bb..eb4f1e31a6a 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -2947,7 +2947,7 @@ static Constant *GetGEPGlobalInitializer(Constant *C, ConstantExpr *CE) {
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 @@ static Constant *GetGEPGlobalInitializer(Constant *C, ConstantExpr *CE) {
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
OpenPOWER on IntegriCloud