From 9e6f2680542b8261bc494743b8a2e443ff45913a Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Fri, 26 May 2017 02:17:13 +0000 Subject: [PATCH] Inline a trivial constructor. llvm-svn: 303958 --- lld/ELF/Writer.cpp | 6 ------ lld/ELF/Writer.h | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 1f31f02eed89..af1eff60b8ac 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -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) diff --git a/lld/ELF/Writer.h b/lld/ELF/Writer.h index 17fbda394a20..e935b6419de6 100644 --- a/lld/ELF/Writer.h +++ b/lld/ELF/Writer.h @@ -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;