[lld] r299593 - Inline a small function. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 5 14:45:47 PDT 2017


Author: ruiu
Date: Wed Apr  5 16:45:47 2017
New Revision: 299593

URL: http://llvm.org/viewvc/llvm-project?rev=299593&view=rev
Log:
Inline a small function. NFC.

Modified:
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=299593&r1=299592&r2=299593&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Wed Apr  5 16:45:47 2017
@@ -148,10 +148,6 @@ template <class ELFT> void Writer<ELFT>:
   Phdrs.erase(I, Phdrs.end());
 }
 
-static uint64_t getOutputFlags(InputSectionBase *S) {
-  return S->Flags & ~(uint64_t)(SHF_GROUP | SHF_COMPRESSED);
-}
-
 // This function scans over the input sections and creates mergeable
 // synthetic sections. It removes MergeInputSections from array and
 // adds new synthetic ones. Each synthetic section is added to the
@@ -169,7 +165,7 @@ static void combineMergableSections() {
       continue;
 
     StringRef OutsecName = getOutputSectionName(MS->Name);
-    uint64_t Flags = getOutputFlags(MS);
+    uint64_t Flags = MS->Flags & ~(uint64_t)(SHF_GROUP | SHF_COMPRESSED);
     uint32_t Alignment = std::max<uint32_t>(MS->Alignment, MS->Entsize);
 
     auto I =




More information about the llvm-commits mailing list