[lld] [lld][MachO] Tail merge strings (PR #161262)
Kyungwoo Lee via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 1 00:12:08 PDT 2025
================
@@ -1776,8 +1817,24 @@ void DeduplicatedCStringSection::finalizeContents() {
// only need to assign the offset.
piece.outSecOff = it->second;
}
- for (CStringInputSection *isec : inputs)
+ for (CStringInputSection *isec : inputs) {
+ for (const auto &[i, piece] : llvm::enumerate(isec->pieces)) {
+ if (!piece.live)
----------------
kyulee-com wrote:
As we've already skipped this for `tailMergeMap` in the prior loop, we can drop this check.
https://github.com/llvm/llvm-project/pull/161262
More information about the llvm-commits
mailing list