[lld] r368533 - [ELF] Remove unnecessary assignment to `used` in replaceWithDefined

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 11 06:32:46 PDT 2019


Author: maskray
Date: Sun Aug 11 06:32:46 2019
New Revision: 368533

URL: http://llvm.org/viewvc/llvm-project?rev=368533&view=rev
Log:
[ELF] Remove unnecessary assignment to `used` in replaceWithDefined

`Symbol::used` is used by Undefined and SharedSymbol to record if a
.symtab entry is needed. It is of no use for Defined.

Modified:
    lld/trunk/ELF/Relocations.cpp

Modified: lld/trunk/ELF/Relocations.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.cpp?rev=368533&r1=368532&r2=368533&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.cpp (original)
+++ lld/trunk/ELF/Relocations.cpp Sun Aug 11 06:32:46 2019
@@ -513,7 +513,6 @@ static void replaceWithDefined(Symbol &s
   sym.isPreemptible = true;
   sym.exportDynamic = true;
   sym.isUsedInRegularObj = true;
-  sym.used = true;
 }
 
 // Reserve space in .bss or .bss.rel.ro for copy relocation.




More information about the llvm-commits mailing list