[PATCH] D130736: [lld][WebAssemby] Demote LazySymbols back to undefined symbols if they are not loaded

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 29 12:02:31 PDT 2022


sbc100 added inline comments.


================
Comment at: lld/wasm/Symbols.h:652
   s2->traced = symCopy.traced;
+  s2->referenced = symCopy.referenced;
 
----------------
dschuff wrote:
> these 2 places that set `referenced` are there so that the `replaceSymbol` you added above works properly?
I need to preserve the `referenced` of the symbol as it gets replaced.. which means I also need to initialize it correctly in `insertName` since all symbols start in that default state.  There is some duplication between the defaults in `insertName` and the default ins the `Symbol` constructor.. its not ideal, but its the same logic that exists in the ELF linker. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130736



More information about the llvm-commits mailing list