[PATCH] D111101: [lld][WebAssembly] Remove redundant check for undefined global (NFC)

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 5 07:33:55 PDT 2021


sbc100 added inline comments.


================
Comment at: lld/wasm/Relocations.cpp:35
 static bool allowUndefined(const Symbol* sym) {
   // Undefined functions and globals with explicit import name are allowed to be
   // undefined at link time.
----------------
sbc100 wrote:
> aheejin wrote:
> > Now that this function does not specifically target globals, is this comment correct? Can data or tables have explicit import names and return `true` here?
> Yes, anything that has an explicit import name should return true here.
> 
> I guess we don't do much testing for those cases because the use of tables outsides of the singleton `__indirect_function_table` is still basically non-existent.
Maybe change the comment too:  `// Symbols with explicit import names are always allowed to be undefined at link time.`


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