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 | 393be88e51bce88754c8b5615e8a295adbdab1e2 (patch) | |
tree | 3e79ac89138858c59c1f73af09b64527778ad944 /lib/Transforms/Scalar/IndVarSimplify.cpp | |
parent | 23ca9c580eb8df31bd537a084ed450eca8ebcf58 (diff) | |
download | external_llvm-393be88e51bce88754c8b5615e8a295adbdab1e2.zip external_llvm-393be88e51bce88754c8b5615e8a295adbdab1e2.tar.gz external_llvm-393be88e51bce88754c8b5615e8a295adbdab1e2.tar.bz2 |
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 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); |