summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/ConstantsContext.h
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-08-19 00:23:17 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-08-19 00:23:17 +0000
commit1cd4aebefe0fdc39d38f2ebde6ce9e23cd03fc90 (patch)
treea21357cab24683292985eb71fc2d74be291b2540 /llvm/lib/IR/ConstantsContext.h
parent25fb110f21c01280b64a9dbfa95063186c98dfd8 (diff)
downloadbcm5719-llvm-1cd4aebefe0fdc39d38f2ebde6ce9e23cd03fc90.tar.gz
bcm5719-llvm-1cd4aebefe0fdc39d38f2ebde6ce9e23cd03fc90.zip
IR: ArrayRef-ize {Insert,Extract}ValueConstantExpr constructors
No functionality change. llvm-svn: 215955
Diffstat (limited to 'llvm/lib/IR/ConstantsContext.h')
-rw-r--r--llvm/lib/IR/ConstantsContext.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/IR/ConstantsContext.h b/llvm/lib/IR/ConstantsContext.h
index 3268d3b0990..c3aefb9ce2d 100644
--- a/llvm/lib/IR/ConstantsContext.h
+++ b/llvm/lib/IR/ConstantsContext.h
@@ -169,11 +169,10 @@ public:
void *operator new(size_t s) {
return User::operator new(s, 1);
}
- ExtractValueConstantExpr(Constant *Agg,
- const SmallVector<unsigned, 4> &IdxList,
+ ExtractValueConstantExpr(Constant *Agg, ArrayRef<unsigned> IdxList,
Type *DestTy)
- : ConstantExpr(DestTy, Instruction::ExtractValue, &Op<0>(), 1),
- Indices(IdxList) {
+ : ConstantExpr(DestTy, Instruction::ExtractValue, &Op<0>(), 1),
+ Indices(IdxList.begin(), IdxList.end()) {
Op<0>() = Agg;
}
@@ -196,10 +195,9 @@ public:
return User::operator new(s, 2);
}
InsertValueConstantExpr(Constant *Agg, Constant *Val,
- const SmallVector<unsigned, 4> &IdxList,
- Type *DestTy)
- : ConstantExpr(DestTy, Instruction::InsertValue, &Op<0>(), 2),
- Indices(IdxList) {
+ ArrayRef<unsigned> IdxList, Type *DestTy)
+ : ConstantExpr(DestTy, Instruction::InsertValue, &Op<0>(), 2),
+ Indices(IdxList.begin(), IdxList.end()) {
Op<0>() = Agg;
Op<1>() = Val;
}
OpenPOWER on IntegriCloud