[lld] r316876 - Initialize members not by assignment but by the member initializer list.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 29 15:26:52 PDT 2017
Author: ruiu
Date: Sun Oct 29 15:26:52 2017
New Revision: 316876
URL: http://llvm.org/viewvc/llvm-project?rev=316876&view=rev
Log:
Initialize members not by assignment but by the member initializer list.
Modified:
lld/trunk/ELF/InputSection.h
Modified: lld/trunk/ELF/InputSection.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.h?rev=316876&r1=316875&r2=316876&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.h (original)
+++ lld/trunk/ELF/InputSection.h Sun Oct 29 15:26:52 2017
@@ -91,11 +91,9 @@ protected:
SectionBase(Kind SectionKind, StringRef Name, uint64_t Flags,
uint64_t Entsize, uint64_t Alignment, uint32_t Type,
uint32_t Info, uint32_t Link)
- : Name(Name), SectionKind(SectionKind), Alignment(Alignment),
- Flags(Flags), Entsize(Entsize), Type(Type), Link(Link), Info(Info) {
- Live = false;
- Assigned = false;
- }
+ : Name(Name), SectionKind(SectionKind), Live(false), Assigned(false),
+ Alignment(Alignment), Flags(Flags), Entsize(Entsize), Type(Type),
+ Link(Link), Info(Info) {}
};
// This corresponds to a section of an input file.
@@ -105,10 +103,7 @@ public:
: SectionBase(Regular, "", /*Flags*/ 0, /*Entsize*/ 0, /*Alignment*/ 0,
/*Type*/ 0,
/*Info*/ 0, /*Link*/ 0),
- Repl(this) {
- NumRelocations = 0;
- AreRelocsRela = false;
- }
+ NumRelocations(0), AreRelocsRela(false), Repl(this) {}
template <class ELFT>
InputSectionBase(ObjFile<ELFT> *File, const typename ELFT::Shdr *Header,
More information about the llvm-commits
mailing list