================
@@ -2087,13 +2095,18 @@ void DwarfDebug::beginInstruction(const MachineInstr 
*MI) {
     // If we have an ongoing unspecified location, nothing to do here.
     if (!DL)
       return;
-    // We have an explicit location, same as the previous location.
-    // But we might be coming back to it after a line 0 record.
-    if ((LastAsmLine == 0 && DL.getLine() != 0) || Flags) {
-      // Reinstate the source location but not marked as a statement.
-      RecordSourceLine(DL, Flags);
+
+    // Skip this if the instruction is Key, else we might accidentally miss an
+    // is_stmt.
+    if (!IsKey) {
----------------
jmorse wrote:

Can we not fold this test, and the comment, into the existing test? "If we have 
an explicit non-key location....". (Avoids some un-necessary indentation).

https://github.com/llvm/llvm-project/pull/133495
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to