diff options
author | Jeremy Morse <jeremy.morse@sony.com> | 2024-01-23 10:43:37 +0000 |
---|---|---|
committer | Jeremy Morse <jeremy.morse@sony.com> | 2024-01-23 22:52:47 +0000 |
commit | 7fc25928233c133a4af1dadf0e060fb5d42ebd4e (patch) | |
tree | 4b4a38f06ea91e5149ef7883b2c673963800d997 /llvm/lib/IR/DebugInfo.cpp | |
parent | 750e90e4403df23d6b271afb90e6b4d463739965 (diff) | |
download | llvm-7fc25928233c133a4af1dadf0e060fb5d42ebd4e.zip llvm-7fc25928233c133a4af1dadf0e060fb5d42ebd4e.tar.gz llvm-7fc25928233c133a4af1dadf0e060fb5d42ebd4e.tar.bz2 |
[DebugInfo][RemoveDIs] "Final" cleanup for non-instr debug-info (#79121)
Here's a raft of minor fixes for the RemoveDIs project that's replacing
dbg.value intrinsics with DPValue objects, all IMO trivial:
* When inserting functions or blocks and calling setIsNewDbgInfoFormat,
do that after setting the Parent pointer, just in case conversion from
(or to) dbg.value mode is triggered.
* When transferring DPValues from an empty range in a splice call, don't
transfer if there are no DPValues attached to the source block at all.
* stripNonLineTableDebugInfo should drop DPValues.
* In insertBefore, don't try to transfer DPValues if there aren't any.
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 53cbf01..d8c1b0d 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -892,6 +892,9 @@ bool llvm::stripNonLineTableDebugInfo(Module &M) { // Strip heapallocsite attachments, they point into the DIType system. if (I.hasMetadataOtherThanDebugLoc()) I.setMetadata("heapallocsite", nullptr); + + // Strip any DPValues attached. + I.dropDbgValues(); } } } |