[PATCH] D102546: [lld][WebAssembly] Refactor input chunk class hierarchy. NFC

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 17:15:32 PDT 2021


sbc100 added a comment.

Thanks!



================
Comment at: lld/wasm/InputChunks.h:122
   ArrayRef<WasmRelocation> relocations;
-  Kind sectionKind;
+  mutable ArrayRef<uint8_t> rawData;
 };
----------------
dschuff wrote:
> Ick. I guess this is the trick you borrowed from ELF to avoid virtual functions? I guess the idea is that the subclass can mutate this directly, but the superclass can return it as const?
Oops, thanks for spotting that!  I don't need that here..  was cargo culted directly from ELF


================
Comment at: lld/wasm/InputChunks.h:155
 
 // Merge segment handling copied from lld/ELF/InputSection.h.  Keep in sync
 // where possible.
----------------
dschuff wrote:
> Is this still true?
Yes. In fact its more true now since the name here matches the ELF name now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102546



More information about the llvm-commits mailing list