From 832437255db5bf10bc2275c643273b0d67e29bdf Mon Sep 17 00:00:00 2001 From: Alkis Evlogimenos Date: Wed, 4 Aug 2004 08:44:43 +0000 Subject: Stop using getValues(). llvm-svn: 15487 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp') 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(C)) { - C = cast(CS->getValues()[CU->getValue()]); + C = CS->getOperand(CU->getValue()); } else if (isa(C)) { C = Constant::getNullValue(STy->getElementType(CU->getValue())); } else { @@ -2957,7 +2957,7 @@ static Constant *GetGEPGlobalInitializer(Constant *C, ConstantExpr *CE) { const ArrayType *ATy = cast(*I); if ((uint64_t)CI->getRawValue() >= ATy->getNumElements()) return 0; if (ConstantArray *CA = dyn_cast(C)) - C = cast(CA->getValues()[CI->getRawValue()]); + C = CA->getOperand(CI->getRawValue()); else if (isa(C)) C = Constant::getNullValue(ATy->getElementType()); else -- cgit v1.2.3