summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2007-09-04 15:46:09 +0000
committerDavid Greene <greened@obbligato.org>2007-09-04 15:46:09 +0000
commitc656cbb8c20d1ea38bdb5d1ac39dbcd0405a98dc (patch)
treead78d988fb13e238e6ac3442f47ef77f22f19695 /llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
parent77b97002e955949352d2740f7b47c41f9402dec7 (diff)
downloadbcm5719-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.cpp5
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);
OpenPOWER on IntegriCloud