summaryrefslogtreecommitdiff
path: root/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
commitb8f74793b9d161bc666fe27fc92fe112b6ec169b (patch)
tree3e79ac89138858c59c1f73af09b64527778ad944 /lib/Transforms/IPO/ArgumentPromotion.cpp
parent382526239944023e435833ce759f536fec4e6225 (diff)
downloadllvm-b8f74793b9d161bc666fe27fc92fe112b6ec169b.tar.gz
llvm-b8f74793b9d161bc666fe27fc92fe112b6ec169b.tar.bz2
llvm-b8f74793b9d161bc666fe27fc92fe112b6ec169b.tar.xz
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/IPO/ArgumentPromotion.cpp')
-rw-r--r--lib/Transforms/IPO/ArgumentPromotion.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp
index 9853afe875..93a7af68a0 100644
--- a/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/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);
}