diff options
author | Frits van Bommel <fvbommel@gmail.com> | 2011-07-18 12:00:32 +0000 |
---|---|---|
committer | Frits van Bommel <fvbommel@gmail.com> | 2011-07-18 12:00:32 +0000 |
commit | 39b5abf507b43da6b92f68b86406e0015ead18e9 (patch) | |
tree | a06cdf80abf33dbfa6fbe90ed17da84cf784e094 /lib/VMCore/Core.cpp | |
parent | c48e1ef0e22b4113dd4dd48c5b170a19fe4d0188 (diff) |
Migrate LLVM and Clang to use the new makeArrayRef(...) functions where previously explicit non-default constructors were used.
Mostly mechanical with some manual reformatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135390 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Core.cpp')
-rw-r--r-- | lib/VMCore/Core.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index c39375db1b..940d0fb3a9 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -506,7 +506,7 @@ LLVMValueRef LLVMMDString(const char *Str, unsigned SLen) { LLVMValueRef LLVMMDNodeInContext(LLVMContextRef C, LLVMValueRef *Vals, unsigned Count) { return wrap(MDNode::get(*unwrap(C), - ArrayRef<Value*>(unwrap<Value>(Vals, Count), Count))); + makeArrayRef(unwrap<Value>(Vals, Count), Count))); } LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count) { @@ -575,8 +575,7 @@ LLVMValueRef LLVMConstStructInContext(LLVMContextRef C, LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed) { Constant **Elements = unwrap<Constant>(ConstantVals, Count); - return wrap(ConstantStruct::getAnon(*unwrap(C), - ArrayRef<Constant*>(Elements, Count), + return wrap(ConstantStruct::getAnon(*unwrap(C), makeArrayRef(Elements, Count), Packed != 0)); } @@ -602,11 +601,11 @@ LLVMValueRef LLVMConstNamedStruct(LLVMTypeRef StructTy, Constant **Elements = unwrap<Constant>(ConstantVals, Count); StructType *Ty = cast<StructType>(unwrap(StructTy)); - return wrap(ConstantStruct::get(Ty, ArrayRef<Constant*>(Elements, Count))); + return wrap(ConstantStruct::get(Ty, makeArrayRef(Elements, Count))); } LLVMValueRef LLVMConstVector(LLVMValueRef *ScalarConstantVals, unsigned Size) { - return wrap(ConstantVector::get(ArrayRef<Constant*>( + return wrap(ConstantVector::get(makeArrayRef( unwrap<Constant>(ScalarConstantVals, Size), Size))); } /*--.. Constant expressions ................................................--*/ @@ -934,8 +933,7 @@ LLVMValueRef LLVMConstShuffleVector(LLVMValueRef VectorAConstant, LLVMValueRef LLVMConstExtractValue(LLVMValueRef AggConstant, unsigned *IdxList, unsigned NumIdx) { return wrap(ConstantExpr::getExtractValue(unwrap<Constant>(AggConstant), - ArrayRef<unsigned>(IdxList, - NumIdx))); + makeArrayRef(IdxList, NumIdx))); } LLVMValueRef LLVMConstInsertValue(LLVMValueRef AggConstant, @@ -943,8 +941,7 @@ LLVMValueRef LLVMConstInsertValue(LLVMValueRef AggConstant, unsigned *IdxList, unsigned NumIdx) { return wrap(ConstantExpr::getInsertValue(unwrap<Constant>(AggConstant), unwrap<Constant>(ElementValueConstant), - ArrayRef<unsigned>(IdxList, - NumIdx))); + makeArrayRef(IdxList, NumIdx))); } LLVMValueRef LLVMConstInlineAsm(LLVMTypeRef Ty, const char *AsmString, @@ -1680,7 +1677,7 @@ LLVMValueRef LLVMBuildInvoke(LLVMBuilderRef B, LLVMValueRef Fn, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, const char *Name) { return wrap(unwrap(B)->CreateInvoke(unwrap(Fn), unwrap(Then), unwrap(Catch), - ArrayRef<Value *>(unwrap(Args), NumArgs), + makeArrayRef(unwrap(Args), NumArgs), Name)); } @@ -2064,7 +2061,7 @@ LLVMValueRef LLVMBuildCall(LLVMBuilderRef B, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, const char *Name) { return wrap(unwrap(B)->CreateCall(unwrap(Fn), - ArrayRef<Value *>(unwrap(Args), NumArgs), + makeArrayRef(unwrap(Args), NumArgs), Name)); } |