From: Duncan P. N. Exon Smith Date: Tue, 19 Aug 2014 00:23:17 +0000 (+0000) Subject: IR: ArrayRef-ize {Insert,Extract}ValueConstantExpr constructors X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fd0a8133e56e6c48d04e395290da69c3926a48d1;p=oota-llvm.git IR: ArrayRef-ize {Insert,Extract}ValueConstantExpr constructors No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215955 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/IR/ConstantsContext.h b/lib/IR/ConstantsContext.h index 3268d3b0990..c3aefb9ce2d 100644 --- a/lib/IR/ConstantsContext.h +++ b/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; }