[lld] r283328 - Remove redundant check. NFC.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 5 08:35:18 PDT 2016


Author: rafael
Date: Wed Oct  5 10:35:18 2016
New Revision: 283328

URL: http://llvm.org/viewvc/llvm-project?rev=283328&view=rev
Log:
Remove redundant check. NFC.

Modified:
    lld/trunk/ELF/OutputSections.cpp

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=283328&r1=283327&r2=283328&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Wed Oct  5 10:35:18 2016
@@ -1241,13 +1241,11 @@ void MergeOutputSection<ELFT>::addSectio
   this->Header.sh_entsize = Sec->getSectionHdr()->sh_entsize;
   Sections.push_back(Sec);
 
-  bool IsString = this->Header.sh_flags & SHF_STRINGS;
-
   for (SectionPiece &Piece : Sec->Pieces) {
     if (!Piece.Live)
       continue;
     uintX_t OutputOffset = Builder.add(toStringRef(Piece.data()));
-    if (!IsString || !shouldTailMerge())
+    if (!shouldTailMerge())
       Piece.OutputOff = OutputOffset;
   }
 }




More information about the llvm-commits mailing list