]> granicus.if.org Git - llvm/commitdiff
Fix compiler warning when using clang 3.6.0
authorMikael Holmen <mikael.holmen@ericsson.com>
Tue, 29 Jan 2019 06:51:28 +0000 (06:51 +0000)
committerMikael Holmen <mikael.holmen@ericsson.com>
Tue, 29 Jan 2019 06:51:28 +0000 (06:51 +0000)
Without the fix we get the following (with -Werror):

../lib/Target/X86/X86ISelLowering.cpp:14181:58: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
  SmallVector<std::array<int, 2>, 2> LaneSrcs(NumLanes, {-1, -1});
                                                         ^~~~~~
                                                         {     }
1 error generated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352455 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index 92001c770978d24f94f9b7f747b8193fde676a7f..0fdbf766a3de7a1829d0c5299997166bd5f99455 100644 (file)
@@ -14178,7 +14178,7 @@ static SDValue lowerShuffleByMerging128BitLanes(
   int NumLanes = VT.getSizeInBits() / 128;
   int LaneSize = 128 / VT.getScalarSizeInBits();
   SmallVector<int, 16> RepeatMask(LaneSize, -1);
-  SmallVector<std::array<int, 2>, 2> LaneSrcs(NumLanes, {-1, -1});
+  SmallVector<std::array<int, 2>, 2> LaneSrcs(NumLanes, {{-1, -1}});
 
   // First pass will try to fill in the RepeatMask from lanes that need two
   // sources.