summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/ArgumentPromotion.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/IPO/ArgumentPromotion.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/IPO/ArgumentPromotion.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/ArgumentPromotion.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
index 9853afe8752..93a7af68a0d 100644
--- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -376,8 +376,8 @@ Function *ArgPromotion::DoPromotion(Function *F,
for (ScalarizeTable::iterator SI = ArgIndices.begin(),
E = ArgIndices.end(); SI != E; ++SI)
Params.push_back(GetElementPtrInst::getIndexedType(I->getType(),
- &(*SI)[0],
- SI->size()));
+ SI->begin(),
+ SI->end()));
if (ArgIndices.size() == 1 && ArgIndices.begin()->empty())
++NumArgumentsPromoted;
@@ -428,7 +428,7 @@ Function *ArgPromotion::DoPromotion(Function *F,
Value *V = *AI;
LoadInst *OrigLoad = OriginalLoads[*SI];
if (!SI->empty()) {
- V = new GetElementPtrInst(V, &(*SI)[0], SI->size(),
+ V = new GetElementPtrInst(V, SI->begin(), SI->end(),
V->getName()+".idx", Call);
AA.copyValue(OrigLoad->getOperand(0), V);
}
OpenPOWER on IntegriCloud