[llvm] [DebugInfo][RemoveDIs] Final cleanup for enabling non-instr-debuginfo (PR #74497)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 09:10:15 PST 2023


================
@@ -218,7 +218,7 @@ void Instruction::moveBeforeImpl(BasicBlock &BB, InstListType::iterator I,
 
     // If we're inserting at point I, and not in front of the DPValues attached
     // there, then we should absorb the DPValues attached to I.
-    if (!InsertAtHead)
+    if (NextMarker && !InsertAtHead)
----------------
OCHyams wrote:

Perhaps this check `NextMarker != nullptr` should move outside this if, to prevent creating a marker on `this` if there's nothing to absorb? YMMV, not essential.

https://github.com/llvm/llvm-project/pull/74497


More information about the llvm-commits mailing list