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 | c656cbb8c20d1ea38bdb5d1ac39dbcd0405a98dc (patch) | |
tree | ad78d988fb13e238e6ac3442f47ef77f22f19695 /llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | |
parent | 77b97002e955949352d2740f7b47c41f9402dec7 (diff) | |
download | bcm5719-llvm-c656cbb8c20d1ea38bdb5d1ac39dbcd0405a98dc.tar.gz bcm5719-llvm-c656cbb8c20d1ea38bdb5d1ac39dbcd0405a98dc.zip |
Update GEP constructors to use an iterator interface to fix
GLIBCXX_DEBUG issues.
llvm-svn: 41697
Diffstat (limited to 'llvm/lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp index 7f0e65e7f27..5e82ad0f7b5 100644 --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/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); |