[PATCH] D105519: [WebAssembly] Deduplicate imports of the same module name, field name, and type

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 14 17:20:30 PDT 2021


sbc100 added inline comments.


================
Comment at: lld/wasm/SyntheticSections.cpp:113
+                                   StringRef *outName) {
+  if (auto *undef = dyn_cast<UndefinedT>(sym)) {
+    *outModule = undef->importModule ? *undef->importModule : defaultModule;
----------------
sbc100 wrote:
> The fact that we need template here make me thing maybe we should just move importModule/importName into the symbol base class and we could then just do `isUndefined()` here... but that is a bigger change.
I created https://reviews.llvm.org/D106026.. I don't mind which one lands first.


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

https://reviews.llvm.org/D105519



More information about the llvm-commits mailing list