[PATCH] D42625: [WebAssembly] Simplify use of InputChunk within Symbols. NFC.

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 05:18:19 PST 2018


ncw added a comment.

LGTM! I'm happy - I even added InputGlobal as a third type, which makes it even uglier, so this looks good. I even added a `Symbol::getChunk` method that's similar to yours (but not as tidy).

Rebasing my patches shouldn't be a problem. One thing I did play around with was trying to store a pointer to the Symbol inside the InputChunk - but I quickly abandoned that, it //won't// work (since some chunks don't have an associated symbol, and some chunks have several associated symbols, and symbols can be //unassociated// from chunks when weak symbols are overridden...). Just an FYI in case you're ever tempted to try the same thing! Symbol ➝ chunk is good, chunk ➝ bad.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D42625





More information about the llvm-commits mailing list