aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-06-21 19:47:52 +0000
committerDan Gohman <gohman@apple.com>2010-06-21 19:47:52 +0000
commit403a8cdda5e76ea689693de16474650b4b0df818 (patch)
tree33757aedb748b2532ddb9ce0437c137741f58b76 /lib/VMCore
parent658ebcc7ec08154e481b4f41fd904681225fbb29 (diff)
downloadexternal_llvm-403a8cdda5e76ea689693de16474650b4b0df818.zip
external_llvm-403a8cdda5e76ea689693de16474650b4b0df818.tar.gz
external_llvm-403a8cdda5e76ea689693de16474650b4b0df818.tar.bz2
Use A.append(...) instead of A.insert(A.end(), ...) when A is a
SmallVector, and other SmallVector simplifications. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106452 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/ConstantFold.cpp2
-rw-r--r--lib/VMCore/Instructions.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp
index c854c85..ec62502 100644
--- a/lib/VMCore/ConstantFold.cpp
+++ b/lib/VMCore/ConstantFold.cpp
@@ -2194,7 +2194,7 @@ Constant *llvm::ConstantFoldGetElementPtr(Constant *C,
}
NewIndices.push_back(Combined);
- NewIndices.insert(NewIndices.end(), Idxs+1, Idxs+NumIdx);
+ NewIndices.append(Idxs+1, Idxs+NumIdx);
return (inBounds && cast<GEPOperator>(CE)->isInBounds()) ?
ConstantExpr::getInBoundsGetElementPtr(CE->getOperand(0),
&NewIndices[0],
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 76bf583..1a091d6 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -1456,7 +1456,7 @@ void InsertValueInst::init(Value *Agg, Value *Val, const unsigned *Idx,
Op<0>() = Agg;
Op<1>() = Val;
- Indices.insert(Indices.end(), Idx, Idx + NumIdx);
+ Indices.append(Idx, Idx + NumIdx);
setName(Name);
}
@@ -1509,7 +1509,7 @@ void ExtractValueInst::init(const unsigned *Idx, unsigned NumIdx,
const Twine &Name) {
assert(NumOperands == 1 && "NumOperands not initialized?");
- Indices.insert(Indices.end(), Idx, Idx + NumIdx);
+ Indices.append(Idx, Idx + NumIdx);
setName(Name);
}