[lld] r371804 - [ELF] Delete a redundant assignment to SectionBase::assigned. NFC

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 19:18:04 PDT 2019


Author: maskray
Date: Thu Sep 12 19:18:04 2019
New Revision: 371804

URL: http://llvm.org/viewvc/llvm-project?rev=371804&view=rev
Log:
[ELF] Delete a redundant assignment to SectionBase::assigned. NFC

LinkerScript::discard marks a section dead. It is unnecessary to set the
`assigned` bit.

Modified:
    lld/trunk/ELF/LinkerScript.cpp

Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=371804&r1=371803&r2=371804&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Thu Sep 12 19:18:04 2019
@@ -457,7 +457,6 @@ void LinkerScript::discard(ArrayRef<Inpu
     if (s == mainPart->hashTab)
       mainPart->hashTab = nullptr;
 
-    s->assigned = false;
     s->markDead();
     discard(s->dependentSections);
   }




More information about the llvm-commits mailing list