[lld-macho] Move ICF members from InputSection to ConcatInputSection
authorJez Ng <jezng@fb.com>
Fri, 25 Jun 2021 02:23:04 +0000 (22:23 -0400)
committerJez Ng <jezng@fb.com>
Fri, 25 Jun 2021 02:23:12 +0000 (22:23 -0400)
commit8aa17d1eaeb48f8782661680d69c28f2458959ad
tree60b00cf6a50aeb0c8460fe45a4738d83cf5c5fa7
parentb904574b3dbdf8e4bc9ebcdfa11144fae5c87aaa
[lld-macho] Move ICF members from InputSection to ConcatInputSection

`icfEqClass` only makes sense on ConcatInputSections since (in contrast
to literal sections) they are deduplicated as an atomic unit.

Similarly, `hasPersonality` and `replacement` don't make sense on
literal sections.

This mirrors LLD-ELF, which stores `icfEqClass` only on non-mergeable
sections.

Reviewed By: #lld-macho, gkm

Differential Revision: https://reviews.llvm.org/D104670
lld/MachO/ICF.cpp
lld/MachO/InputSection.cpp
lld/MachO/InputSection.h
lld/MachO/UnwindInfoSection.cpp
lld/MachO/Writer.cpp