[lld] [lld-macho] Use Symbols as branch target for safe_thunks ICF (PR #126835)

via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 11:17:08 PST 2025


================
@@ -27,6 +27,8 @@ using namespace lld;
 using namespace lld::macho;
 
 static constexpr bool verboseDiagnostics = false;
+// This counter is used to generate unique thunk names.
+static uint64_t icfThunkCounter = 0;
----------------
alx32 wrote:

This needs to be reset at the start of ICF (useful for using LLD as a library). I've included this in the new version. 

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


More information about the llvm-commits mailing list