[DebugInfo][RemoveDIs] Avoid leaking trailing DPMarkers (#74458)
commit71809cfc7ae2fc69b5f6a2069354e74b320ec8d3
authorJeremy Morse <jeremy.morse@sony.com>
Tue, 5 Dec 2023 15:41:00 +0000 (5 15:41 +0000)
committerGitHub <noreply@github.com>
Tue, 5 Dec 2023 15:41:00 +0000 (5 15:41 +0000)
tree6ce6e5d5ff168fc54cd02aeeb97d7674595a259e
parent80fa79609e9adf0e2ccd71b9838d7fdb6ab2d07a
[DebugInfo][RemoveDIs] Avoid leaking trailing DPMarkers (#74458)

In the debug-info-splice implementation, we need to be careful to delete
trailing DPMarkers from blocks when we splice their contents out. This
is equivalent to removing the terminator from a block, then splicing the
rest of it's contents to another block: any DPValues trailing at the end
of the block get moved and we need to clean up afterwards.
llvm/lib/IR/BasicBlock.cpp