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/IPO/GlobalOpt.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/IPO/GlobalOpt.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/GlobalOpt.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index 520af8750e1..58a705d496a 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp @@ -464,7 +464,7 @@ static GlobalVariable *SRAGlobal(GlobalVariable *GV) { Idxs.push_back(NullInt); for (unsigned i = 3, e = GEPI->getNumOperands(); i != e; ++i) Idxs.push_back(GEPI->getOperand(i)); - NewPtr = new GetElementPtrInst(NewPtr, &Idxs[0], Idxs.size(), + NewPtr = new GetElementPtrInst(NewPtr, Idxs.begin(), Idxs.end(), GEPI->getName()+"."+utostr(Val), GEPI); } GEP->replaceAllUsesWith(NewPtr); @@ -698,7 +698,7 @@ static GlobalVariable *OptimizeGlobalAddressOfMalloc(GlobalVariable *GV, MI->getAlignment(), MI->getName(), MI); Value* Indices[2]; Indices[0] = Indices[1] = Constant::getNullValue(Type::Int32Ty); - Value *NewGEP = new GetElementPtrInst(NewMI, Indices, 2, + Value *NewGEP = new GetElementPtrInst(NewMI, Indices, Indices + 2, NewMI->getName()+".el0", MI); MI->replaceAllUsesWith(NewGEP); MI->eraseFromParent(); @@ -926,7 +926,7 @@ static void RewriteUsesOfLoadForHeapSRoA(LoadInst *Ptr, GEPIdx.push_back(GEPI->getOperand(1)); GEPIdx.append(GEPI->op_begin()+3, GEPI->op_end()); - Value *NGEPI = new GetElementPtrInst(NewPtr, &GEPIdx[0], GEPIdx.size(), + Value *NGEPI = new GetElementPtrInst(NewPtr, GEPIdx.begin(), GEPIdx.end(), GEPI->getName(), GEPI); GEPI->replaceAllUsesWith(NGEPI); GEPI->eraseFromParent(); |