[llvm-branch-commits] [lld] [lld][macho] Fix thunks with multiple text sections (PR #197049)

Ellis Hoag via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue May 12 09:47:00 PDT 2026


================

----------------
ellishg wrote:

I think this makes a code a little harder to follow. If you are concerned about performance, I am assuming `isTargetStubsAndInRange()` will be inlined, or at least partially inlined, so that if `estimatedStubsEnd` is `std::nullopt` then the rest of the check will be skipped.

In general I am a fan of avoiding premature optimization. If we want to improve performance, then we should profile with a tool and see where the bottleneck is. But I'm pretty sure other parts of the linker are slower than this for large binaries.

https://github.com/llvm/llvm-project/pull/197049


More information about the llvm-branch-commits mailing list