summaryrefslogtreecommitdiff
path: root/lib/VMCore/Core.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-06-22 09:24:39 +0000
committerJay Foad <jay.foad@gmail.com>2011-06-22 09:24:39 +0000
commit267010864e139781ef5949939e081c41f954de0a (patch)
treea70c0e226a9540d345c8da8c97e59e402b8e873a /lib/VMCore/Core.cpp
parenta0c138429e101f573d43740322245c1d5b8b04a0 (diff)
downloadllvm-267010864e139781ef5949939e081c41f954de0a.tar.gz
llvm-267010864e139781ef5949939e081c41f954de0a.tar.bz2
llvm-267010864e139781ef5949939e081c41f954de0a.tar.xz
Replace the existing forms of ConstantArray::get() with a single form
that takes an ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133615 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Core.cpp')
-rw-r--r--lib/VMCore/Core.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp
index 16ccc7b893..bdd988e7b0 100644
--- a/lib/VMCore/Core.cpp
+++ b/lib/VMCore/Core.cpp
@@ -625,9 +625,8 @@ LLVMValueRef LLVMConstString(const char *Str, unsigned Length,
}
LLVMValueRef LLVMConstArray(LLVMTypeRef ElementTy,
LLVMValueRef *ConstantVals, unsigned Length) {
- return wrap(ConstantArray::get(ArrayType::get(unwrap(ElementTy), Length),
- unwrap<Constant>(ConstantVals, Length),
- Length));
+ ArrayRef<Constant*> V(unwrap<Constant>(ConstantVals, Length), Length);
+ return wrap(ConstantArray::get(ArrayType::get(unwrap(ElementTy), Length), V));
}
LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count,
LLVMBool Packed) {