From a65abd55b4ce081bf8a5d070b7f1174a7d5bbcda Mon Sep 17 00:00:00 2001 From: Serge Guelton Date: Wed, 10 May 2017 13:23:47 +0000 Subject: [PATCH] Use clang++-3.5 compatible initializer_list constructor Otherwise, a warning is issued. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302655 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/Constants.h | 2 +- include/llvm/IR/DerivedTypes.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/llvm/IR/Constants.h b/include/llvm/IR/Constants.h index a4dee43d21b..5db9b3bb504 100644 --- a/include/llvm/IR/Constants.h +++ b/include/llvm/IR/Constants.h @@ -458,7 +458,7 @@ public: static typename std::enable_if::value, Constant *>::type get(StructType *T, Csts *... Vs) { - SmallVector Values{{Vs...}}; + SmallVector Values({Vs...}); return get(T, Values); } diff --git a/include/llvm/IR/DerivedTypes.h b/include/llvm/IR/DerivedTypes.h index 82b5eb834c8..6a7c83f5caa 100644 --- a/include/llvm/IR/DerivedTypes.h +++ b/include/llvm/IR/DerivedTypes.h @@ -234,7 +234,7 @@ public: StructType *>::type create(StringRef Name, Type *elt1, Tys *... elts) { assert(elt1 && "Cannot create a struct type with no elements with this"); - SmallVector StructFields{{elt1, elts...}}; + SmallVector StructFields({elt1, elts...}); return create(StructFields, Name); } @@ -254,7 +254,7 @@ public: get(Type *elt1, Tys *... elts) { assert(elt1 && "Cannot create a struct type with no elements with this"); LLVMContext &Ctx = elt1->getContext(); - SmallVector StructFields{{elt1, elts...}}; + SmallVector StructFields({elt1, elts...}); return llvm::StructType::get(Ctx, StructFields); } @@ -290,7 +290,7 @@ public: typename std::enable_if::value, void>::type setBody(Type *elt1, Tys *... elts) { assert(elt1 && "Cannot create a struct type with no elements with this"); - SmallVector StructFields{{elt1, elts...}}; + SmallVector StructFields({elt1, elts...}); setBody(StructFields); } -- 2.50.1