aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer
diff options
context:
space:
mode:
authoralx32 <103613512+alx32@users.noreply.github.com>2024-11-20 09:36:52 -0800
committerGitHub <noreply@github.com>2024-11-20 09:36:52 -0800
commit74046855981bad2847c8f03114efd731da4d216c (patch)
tree776eddea7e5765abff9867f1562f2663e8bc5b31 /llvm/lib/Bitcode/Writer
parent81055ff070e128bff78c8fa2d8ffe4c92ae692a6 (diff)
downloadllvm-74046855981bad2847c8f03114efd731da4d216c.zip
llvm-74046855981bad2847c8f03114efd731da4d216c.tar.gz
llvm-74046855981bad2847c8f03114efd731da4d216c.tar.bz2
[lld-macho] Fix compatibility between --icf=safe_thunks and --keep-icf-stabs (#116687)
Currently when `--icf=safe_thunks` is used, `STABS` entries cannot be generated for ICF'ed functions. This is because if ICF converts a full function into a thunk and then we generate a `STABS` entry for the thunk, `dsymutil` will expect to find the entire function body at the location of the thunk. Because just a thunk will be present at the location of the `STABS` entry - dsymutil will generate invalid debug info for such scenarios. With this change, if `--icf=safe_thunks` is used and `--keep-icf-stabs` is also specified, STABS entries will be created for all functions, even merged ones. However, the STABS entries will point at the actual (full) function body while having the name of the thunk. This way we still get program correctness as well as correct DWARF data. When doing this, the debug data will be identical to the scenario where we're using `--icf=all` and `--keep-icf-stabs`, but the actual program will also contain thunks, which won't show up in the DWARF data.
Diffstat (limited to 'llvm/lib/Bitcode/Writer')
0 files changed, 0 insertions, 0 deletions