diff options
author | David Greene <greened@obbligato.org> | 2007-09-04 15:46:09 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2007-09-04 15:46:09 +0000 |
commit | b8f74793b9d161bc666fe27fc92fe112b6ec169b (patch) | |
tree | 3e79ac89138858c59c1f73af09b64527778ad944 /lib/Transforms/Scalar/IndVarSimplify.cpp | |
parent | 382526239944023e435833ce759f536fec4e6225 (diff) |
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
Diffstat (limited to 'lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r-- | lib/Transforms/Scalar/IndVarSimplify.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 7f0e65e7f2..5e82ad0f7b 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); |