[PATCH] D43496: [WebAssembly] Split addDefined into two different methods. NFC.

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 09:55:56 PST 2018


sbc100 added inline comments.


================
Comment at: wasm/SymbolTable.cpp:150
+
+static bool shouldReplace(const Symbol &Existing, const NewSymbol &New) {
   bool Replace = false;
----------------
ruiu wrote:
> We can just pass File, Flags, Chunk and IsFunction to this class, then we don't need NewSymbol class, no?
(I assume you mean "..to this function).

Thats how it was before but I found it easier to read this way, since all the properties of the new symbol are under `New` this way, and i makes the call site a little more readable (to me).   I can revert if you prefer.  

Also, the symbol table change is going to add another field (or anther param) here for input global (that don't use chunks).


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D43496





More information about the llvm-commits mailing list