[PATCH] D40845: [WebAssembly] COMDAT: LLD support

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 11 04:22:49 PST 2018


ncw added inline comments.


================
Comment at: wasm/InputFiles.cpp:271
+    if (!Comdat.empty() && Symtab->findComdat(Comdat) != this)
+      Seg->Discarded = true;
+  }
----------------
sbc100 wrote:
> Can we check the comdats when the segment or function is first created to avoid two loops?
> 
> Maybe we could then avoid even adding the to the Functions or Segments list at all and just discard them?
It was harder before, but in the last fortnight of refactoring, the signatures all match up nicely now, making that easier :)

You're right that's now the best place for it.

I've moved the check above, to where we add the symbols to the SymbolTable.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D40845





More information about the llvm-commits mailing list