[PATCH] D111101: [lld][WebAssembly] Remove redundant check for undefined global (NFC)
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 4 16:04:15 PDT 2021
sbc100 added inline comments.
================
Comment at: lld/wasm/Relocations.cpp:45
- if (g->importName)
- return true;
return config->allowUndefinedSymbols.count(sym->getName()) != 0;
----------------
Actually there was a recent refactor that made `importName` a (optional) member of the Symbol superclass.. so I think this can be written as:
```
if (sym->importName)
return true;
if (isa<UndefinedFunction>(sym) && config->importUndefined)
return true;
```
But if you would rather land this as is that is fine too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111101/new/
https://reviews.llvm.org/D111101
More information about the llvm-commits
mailing list