[PATCH] D62234: Copy symbol length when we replace a symbol.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 02:16:55 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL361364: Copy symbol length when we replace a symbol. (authored by ruiu, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D62234?vs=200650&id=200673#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62234/new/

https://reviews.llvm.org/D62234

Files:
  lld/trunk/ELF/Symbols.h


Index: lld/trunk/ELF/Symbols.h
===================================================================
--- lld/trunk/ELF/Symbols.h
+++ lld/trunk/ELF/Symbols.h
@@ -486,6 +486,11 @@
   IsPreemptible = Old.IsPreemptible;
   ScriptDefined = Old.ScriptDefined;
 
+  // Symbol length is computed lazily. If we already know a symbol length,
+  // propagate it.
+  if (NameData == Old.NameData && NameSize == 0 && Old.NameSize != 0)
+    NameSize = Old.NameSize;
+
   // Print out a log message if --trace-symbol was specified.
   // This is for debugging.
   if (Traced)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62234.200673.patch
Type: text/x-patch
Size: 560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190522/a715c791/attachment.bin>


More information about the llvm-commits mailing list