[lld] [lld-macho] Fix compatibility between --icf=safe_thunks and --keep-icf-stabs (PR #116687)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 14:04:07 PST 2024


================
@@ -1251,26 +1255,26 @@ void SymtabSection::emitStabs() {
 
       // We use 'originalIsec' to get the file id of the symbol since 'isec()'
       // might point to the merged ICF symbol's file
-      symbolsNeedingStabs.emplace_back(defined,
-                                       defined->originalIsec->getFile()->id);
+      Defined *funcBodySym = getFuncBodySym(defined);
----------------
alx32 wrote:

Not planning to use it anywhere else - but I added the separate function for clarity. The logic / terms are complex enough that it won't quite be clear to a newcomer. Do you think we should inline ? 

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


More information about the llvm-commits mailing list