[llvm] 5da6d4e - Speculative build fix for GCC 5.3.0

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 24 10:59:58 PDT 2019


Author: Hans Wennborg
Date: 2019-10-24T19:59:35+02:00
New Revision: 5da6d4ec1646706a5e7b6866c0085e35165419ba

URL: https://github.com/llvm/llvm-project/commit/5da6d4ec1646706a5e7b6866c0085e35165419ba
DIFF: https://github.com/llvm/llvm-project/commit/5da6d4ec1646706a5e7b6866c0085e35165419ba.diff

LOG: Speculative build fix for GCC 5.3.0

It was failing with

llvm/lib/MC/XCOFFObjectWriter.cpp:168:53: error: array must be initialized with a brace-enclosed initializer
   std::array<Section *const, 2> Sections{&Text, &BSS};
                                                     ^

Added: 
    

Modified: 
    llvm/lib/MC/XCOFFObjectWriter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/MC/XCOFFObjectWriter.cpp b/llvm/lib/MC/XCOFFObjectWriter.cpp
index 2868972f71ce..f2c054f65cc3 100644
--- a/llvm/lib/MC/XCOFFObjectWriter.cpp
+++ b/llvm/lib/MC/XCOFFObjectWriter.cpp
@@ -165,7 +165,7 @@ class XCOFFObjectWriter : public MCObjectWriter {
 
   // All the XCOFF sections, in the order they will appear in the section header
   // table.
-  std::array<Section *const, 2> Sections{&Text, &BSS};
+  std::array<Section *const, 2> Sections = {&Text, &BSS};
 
   CsectGroup &getCsectGroup(const MCSectionXCOFF *MCSec);
 


        


More information about the llvm-commits mailing list