From 393be88e51bce88754c8b5615e8a295adbdab1e2 Mon Sep 17 00:00:00 2001 From: David Greene Date: Tue, 4 Sep 2007 15:46:09 +0000 Subject: Update GEP constructors to use an iterator interface to fix GLIBCXX_DEBUG issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41697 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/IndVarSimplify.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/Transforms/Scalar/IndVarSimplify.cpp') diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 7f0e65e..5e82ad0 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -178,8 +178,11 @@ void IndVarSimplify::EliminatePointerRecurrence(PHINode *PN, Constant *NCE = ConstantExpr::getGetElementPtr(CE->getOperand(0), &CEIdxs[0], CEIdxs.size()); + Value *Idx[2]; + Idx[0] = Constant::getNullValue(Type::Int32Ty); + Idx[1] = NewAdd; GetElementPtrInst *NGEPI = new GetElementPtrInst( - NCE, Constant::getNullValue(Type::Int32Ty), NewAdd, + NCE, Idx, Idx + 2, GEPI->getName(), GEPI); SE->deleteValueFromRecords(GEPI); GEPI->replaceAllUsesWith(NGEPI); -- cgit v1.1