]> granicus.if.org Git - llvm/commitdiff
Use clang++-3.5 compatible initializer_list constructor
authorSerge Guelton <sguelton@quarkslab.com>
Wed, 10 May 2017 13:23:47 +0000 (13:23 +0000)
committerSerge Guelton <sguelton@quarkslab.com>
Wed, 10 May 2017 13:23:47 +0000 (13:23 +0000)
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
include/llvm/IR/DerivedTypes.h

index a4dee43d21b437aec5e81a499990390385a61bd2..5db9b3bb50483bfc80f1ada44f94adbe7ae2d3fc 100644 (file)
@@ -458,7 +458,7 @@ public:
   static typename std::enable_if<are_base_of<Constant, Csts...>::value,
                                  Constant *>::type
   get(StructType *T, Csts *... Vs) {
-    SmallVector<Constant *, 8> Values{{Vs...}};
+    SmallVector<Constant *, 8> Values({Vs...});
     return get(T, Values);
   }
 
index 82b5eb834c85dfcc9f54f94c03a1fcf005ab1edb..6a7c83f5caa2e7519eed348126a768e2b752b9e6 100644 (file)
@@ -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<llvm::Type *, 8> StructFields{{elt1, elts...}};
+    SmallVector<llvm::Type *, 8> 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<llvm::Type *, 8> StructFields{{elt1, elts...}};
+    SmallVector<llvm::Type *, 8> StructFields({elt1, elts...});
     return llvm::StructType::get(Ctx, StructFields);
   }
 
@@ -290,7 +290,7 @@ public:
   typename std::enable_if<are_base_of<Type, Tys...>::value, void>::type
   setBody(Type *elt1, Tys *... elts) {
     assert(elt1 && "Cannot create a struct type with no elements with this");
-    SmallVector<llvm::Type *, 8> StructFields{{elt1, elts...}};
+    SmallVector<llvm::Type *, 8> StructFields({elt1, elts...});
     setBody(StructFields);
   }