[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
Thu Jul 28 17:21:06 PDT 2022


sbc100 added inline comments.


================
Comment at: lld/wasm/Driver.cpp:577
+    if (auto* s = dyn_cast<LazySymbol>(sym)) {
+      if (s->signature) {
+        LLVM_DEBUG(llvm::dbgs()
----------------
dschuff wrote:
> if (s->signature)
> is the way to differentiate function symbols from data symbols?
Yes see the comment in `LazySymbol`:

```
  // Lazy symbols can have a signature because they can replace an               
  // UndefinedFunction in which case we need to be able to preserve the          
  // signature.                                                                     
  // TODO(sbc): This repetition of the signature field is inelegant.  Revisit    
  // the use of class hierarchy to represent symbol taxonomy.                    
  const WasmSignature *signature = nullptr;       
```




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