[lld-macho] Simplify DeduplicatedCStringSection::finalizeContents. NFC
authorFangrui Song <i@maskray.me>
Fri, 14 Jan 2022 21:12:57 +0000 (13:12 -0800)
committerFangrui Song <i@maskray.me>
Fri, 14 Jan 2022 21:12:57 +0000 (13:12 -0800)
commit7c269db779ff3950bac2e25ea78b14b4e2b8b247
tree7c40b4824a0457c577caf33e6ef7f219fe9ab50d
parent6cacd420a1d72bca7809e6b516fb1e18ac6056c8
[lld-macho] Simplify DeduplicatedCStringSection::finalizeContents. NFC

Tail merge is slow and of low value. With regular string deduplication, we can
just use the return value of StringTableBuilder::add.

There is no noticeable performance increase because without deduplication
`__cstring` is quite small (7.6MiB for chromium_framework).

Reviewed By: #lld-macho, Jez Ng

Differential Revision: https://reviews.llvm.org/D117273
lld/MachO/SyntheticSections.cpp