aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/GlobalOpt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-12 22:56:41 +0000
committerChris Lattner <sabre@nondot.org>2007-02-12 22:56:41 +0000
commit1ccd185cb49d81465a2901622e58ceae046d1d83 (patch)
treecbf922d862143d8d1d389ee4041c409b931cb04e /lib/Transforms/IPO/GlobalOpt.cpp
parent48d3c108b6c78a90070d068cae02ca9d7b08485f (diff)
stop using methods that take vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34205 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/GlobalOpt.cpp')
-rw-r--r--lib/Transforms/IPO/GlobalOpt.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp
index f5b12712f3..e2e707c4d8 100644
--- a/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/lib/Transforms/IPO/GlobalOpt.cpp
@@ -908,11 +908,12 @@ static void RewriteUsesOfLoadForHeapSRoA(LoadInst *Ptr,
Value *NewPtr = InsertedLoadsForPtr[FieldNo];
// Create the new GEP idx vector.
- std::vector<Value*> GEPIdx;
+ SmallVector<Value*, 8> GEPIdx;
GEPIdx.push_back(GEPI->getOperand(1));
- GEPIdx.insert(GEPIdx.end(), GEPI->op_begin()+3, GEPI->op_end());
+ GEPIdx.append(GEPI->op_begin()+3, GEPI->op_end());
- Value *NGEPI = new GetElementPtrInst(NewPtr, GEPIdx, GEPI->getName(), GEPI);
+ Value *NGEPI = new GetElementPtrInst(NewPtr, &GEPIdx[0], GEPIdx.size(),
+ GEPI->getName(), GEPI);
GEPI->replaceAllUsesWith(NGEPI);
GEPI->eraseFromParent();
}