[PATCH] D104671: [lld-macho] Extend ICF to literal sections

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 19:29:29 PDT 2021


thakis added inline comments.


================
Comment at: lld/MachO/Writer.cpp:948
+  if (in.cStringSection)
+    in.cStringSection->finalizeContents();
+  // TODO: WordLiteralSection & CFStringSection should be finalized here too
----------------
I rebased the cstring alignment patch across this naively (a8a6e5b094aac642f436390294ec837400c521bb) and this came out pretty weird (because for non-deduped cstring sections this doesn't do any folding).

Maybe CStringSection should keep overriding finalize() and also add an empty virtual foldLiterals that DedupCStringSection overrides?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104671



More information about the llvm-commits mailing list