[llvm-branch-commits] [llvm] [Dexter] Add support for writing !step values (PR #203845)

Orlando Cazalet-Hyams via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jun 30 07:05:03 PDT 2026


================
@@ -0,0 +1,31 @@
+/// NB: The exact contents of this file are compared against the corresponding
+///     "_expected" file in this directory; any changes to this file, including
+///     comments, will require updating the expected file.
+
+int main() {
+  int Go = 0;
+  int Times = 0;
+start:
+  Times += 1;
+  for (int I = 0; I < 3; ++I) {
+    if (I == 1)
+      Go += 1;
+    if (I > 1 && Go % 2)
+      goto start; // !dex_label first_goto
+  }
+  if (Times < 4)
+    goto start; // !dex_label second_goto
+  return 0;
+}
+
+/*
+---
+!where {function: main}:
+  ? !step exactly
+  # For test clarity: we step on the first goto 2 times, and the second once.
+  !and {lines: !label first_goto}:
+    !step exactly: [!label first_goto, !label first_goto]
----------------
OCHyams wrote:

Ah right, I assumed this is where all the steps were coming from but I now see there's the `? !step exactly` a few lines above that is doing it. Thanks for clarifying, I'm happy either way

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


More information about the llvm-branch-commits mailing list