alx32 89889149cd
[lld-macho] Improve ICF thunk folding logic (#131186)
Refactor to add some early return logic to `applySafeThunksToRange` so
that we completely skip irrelevant ranges.

Also add a check for `isCodeSection` to ensure we only apply branch
thunks to code section (they don't make sense for anything else).
Currently this isn't an issue since there are no `keepUnique` non-code
sections - but this is not a hard restriction and may be implemented in
the future, so we should be able to handle (i.e. avoid) this scenario.
2025-03-14 15:49:34 -07:00
..