[PATCH] D43493: [WebAssembly] Remove InputChunk from Symbol baseclass. NFC.
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 20 09:39:57 PST 2018
sbc100 added inline comments.
================
Comment at: wasm/Writer.cpp:665
continue;
- if (!Sym->getChunk()->Live)
+ if (!Sym->isLive())
continue;
----------------
ruiu wrote:
> I would recommend removing Symbol::isLive and use getChunk() and isLive() directly instead. It is because the notion of dead/alive is about chunks (or sections), and symbols are not directly considered as dead/alive. You could think that symbols are dead if they point to dead sections, and that makes some sense, but I think that not adding isLive() to Symbol makes things easier to understand.
OK. reverting for now.
I was looking at how COFF and ELF does. COFF has an `isLive()` method on the Symbol which works like this one, and ELF has `Used` bit on the symbol which seems to mean `Live` where its used.
We might want to unify these going forward, but keeping this change small.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D43493
More information about the llvm-commits
mailing list