Inline a trivial constructor.
authorRui Ueyama <ruiu@google.com>
Fri, 26 May 2017 02:17:13 +0000 (02:17 +0000)
committerRui Ueyama <ruiu@google.com>
Fri, 26 May 2017 02:17:13 +0000 (02:17 +0000)
llvm-svn: 303958

lld/ELF/Writer.cpp
lld/ELF/Writer.h

index 1f31f02..af1eff6 100644 (file)
@@ -794,12 +794,6 @@ static bool compareSections(const OutputSection *A, const OutputSection *B) {
   return compareSectionsNonScript(A, B);
 }
 
-// Program header entry
-PhdrEntry::PhdrEntry(unsigned Type, unsigned Flags) {
-  p_type = Type;
-  p_flags = Flags;
-}
-
 void PhdrEntry::add(OutputSection *Sec) {
   Last = Sec;
   if (!First)
index 17fbda3..e935b64 100644 (file)
@@ -30,7 +30,7 @@ bool isRelroSection(const OutputSection *Sec);
 // Each contains type, access flags and range of output sections that will be
 // placed in it.
 struct PhdrEntry {
-  PhdrEntry(unsigned Type, unsigned Flags);
+  PhdrEntry(unsigned Type, unsigned Flags) : p_type(Type), p_flags(Flags) {}
   void add(OutputSection *Sec);
 
   uint64_t p_paddr = 0;