[llvm] [DebugInfo][RemoveDIs] Make dropping variable locations explicit (PR #72399)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 15 07:24:33 PST 2023
================
@@ -5179,6 +5184,15 @@ bool SimplifyCFGOpt::simplifyUnreachable(UnreachableInst *UI) {
bool Changed = false;
+ // Ensure that any debug-info records that used to occur after the Unreachable
+ // are moved to in front of it -- otherwise they'll "dangle" at the end of
+ // the block.
+ BB->flushTerminatorDbgValues();
+
+ // Debug-info records on the unreachable inst itself should be deleted, as
+ // below we delete everything past the final executable instruction.
+ UI->dropDbgValues();
----------------
OCHyams wrote:
Don't the DPValues on the unreachable come "before" it though?
https://github.com/llvm/llvm-project/pull/72399
More information about the llvm-commits
mailing list