[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:32:42 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.
----------------
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.


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