From 1cd4aebefe0fdc39d38f2ebde6ce9e23cd03fc90 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Tue, 19 Aug 2014 00:23:17 +0000 Subject: [PATCH] IR: ArrayRef-ize {Insert,Extract}ValueConstantExpr constructors No functionality change. llvm-svn: 215955 --- llvm/lib/IR/ConstantsContext.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/llvm/lib/IR/ConstantsContext.h b/llvm/lib/IR/ConstantsContext.h index 3268d3b09902..c3aefb9ce2da 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 &IdxList, + ExtractValueConstantExpr(Constant *Agg, ArrayRef 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 &IdxList, - Type *DestTy) - : ConstantExpr(DestTy, Instruction::InsertValue, &Op<0>(), 2), - Indices(IdxList) { + ArrayRef IdxList, Type *DestTy) + : ConstantExpr(DestTy, Instruction::InsertValue, &Op<0>(), 2), + Indices(IdxList.begin(), IdxList.end()) { Op<0>() = Agg; Op<1>() = Val; }