[lld] r326933 - Initialize a member in C++11 style. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 7 11:25:27 PST 2018


Author: ruiu
Date: Wed Mar  7 11:25:27 2018
New Revision: 326933

URL: http://llvm.org/viewvc/llvm-project?rev=326933&view=rev
Log:
Initialize a member in C++11 style. NFC.

Modified:
    lld/trunk/ELF/OutputSections.cpp
    lld/trunk/ELF/OutputSections.h

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=326933&r1=326932&r2=326933&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Wed Mar  7 11:25:27 2018
@@ -72,9 +72,7 @@ void OutputSection::writeHeaderTo(typena
 OutputSection::OutputSection(StringRef Name, uint32_t Type, uint64_t Flags)
     : BaseCommand(OutputSectionKind),
       SectionBase(Output, Name, Flags, /*Entsize*/ 0, /*Alignment*/ 1, Type,
-                  /*Info*/ 0,
-                  /*Link*/ 0),
-      SectionIndex(INT_MAX) {
+                  /*Info*/ 0, /*Link*/ 0) {
   Live = false;
 }
 

Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=326933&r1=326932&r2=326933&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Wed Mar  7 11:25:27 2018
@@ -51,7 +51,7 @@ public:
   uint64_t getLMA() const { return PtLoad ? Addr + PtLoad->LMAOffset : Addr; }
   template <typename ELFT> void writeHeaderTo(typename ELFT::Shdr *SHdr);
 
-  unsigned SectionIndex;
+  unsigned SectionIndex = INT_MAX;
   unsigned SortRank;
 
   uint32_t getPhdrFlags() const;




More information about the llvm-commits mailing list