This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho][nfc] Rename MergedOutputSection to ConcatOutputSection
ClosedPublic

Authored by int3 on May 22 2021, 5:52 PM.

Details

Summary

The ELF format has the concept of merge sections (marked by SHF_MERGE),
which contain data that can be safely deduplicated. The Mach-O
equivalents are called literal sections (marked by S_CSTRING_LITERALS or
S_{4,8,16}BYTE_LITERALS). While the Mach-O format doesn't use the word
'merge', to avoid confusion, I've renamed our MergedOutputSection to
ConcatOutputSection. I believe it's a more descriptive name too.

This renaming sets the stage for D102964: [lld-macho] Implement cstring deduplication.

Diff Detail

Event Timeline

int3 created this revision.May 22 2021, 5:52 PM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: mgorny. · View Herald Transcript
int3 requested review of this revision.May 22 2021, 5:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 22 2021, 5:52 PM
alexander-shaposhnikov added inline comments.
lld/MachO/ConcatOutputSection.h
29–30

explicit

int3 updated this revision to Diff 347228.May 22 2021, 7:12 PM
int3 marked an inline comment as done.
This revision is now accepted and ready to land.May 22 2021, 7:18 PM
gkm added inline comments.May 24 2021, 7:55 AM
lld/MachO/ConcatOutputSection.h
30

s/MergedKind/ConcatKind/

int3 marked an inline comment as done.May 25 2021, 11:59 AM