aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/CommandGuide
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2023-09-11 18:19:52 +0100
committerJeremy Morse <jeremy.morse@sony.com>2023-09-11 19:00:44 +0100
commit1ce1732f82aec29ec27d6de58153d516bca1d633 (patch)
tree3cd041738acb0df7de264c690299fbb712f41a78 /llvm/docs/CommandGuide
parent5293109774def143a7afe96e5705ffc7d74ed177 (diff)
downloadllvm-1ce1732f82aec29ec27d6de58153d516bca1d633.zip
llvm-1ce1732f82aec29ec27d6de58153d516bca1d633.tar.gz
llvm-1ce1732f82aec29ec27d6de58153d516bca1d633.tar.bz2
[DebugInfo] Use getStableDebugLoc to pick IRBuilder DebugLocs
When IRBuilder is given an insertion position and there is debug-info, it sets the DebugLoc of newly inserted instructions to the DebugLoc of the insertion position. Unfortunately, that means if you insert in front of a debug intrinsics, your "real" instructions get potentially-misleading source locations from the debug intrinsics. Worse, if you compile -gmlt to get source locations but no variable locations, you'll get different source locations to a normal -g build, which is silly. Rectify this with the getStableDebugLoc method, which skips over any debug intrinsics to find the next "real" instruction. This is the source location that you would get if you compile with -gmlt, and it remains stable in the presence of debug intrinsics. The changed tests show a few locations where this has been happening, for example selecting line-zero locations for instrumentation on a perfectly valid call site. Differential Revision: https://reviews.llvm.org/D159485
Diffstat (limited to 'llvm/docs/CommandGuide')
0 files changed, 0 insertions, 0 deletions