Files
swift-mirror/test/IRGen/debug_step.sil
Erik Eckstein cef6ef9a84 SIL: add a debug_step instruction
This instruction can be inserted by Onone optimizations as a replacement for deleted instructions to
ensure that it's possible to single step on its location.
2023-02-09 06:50:05 +01:00

17 lines
486 B
Plaintext

// RUN: %target-swift-frontend -g -emit-ir %s | %FileCheck %s
// CHECK-LABEL: define {{.*}} @test_debug_step
sil @test_debug_step : $@convention(thin) () -> () {
bb0:
// CHECK: "nop"{{.*}}, !dbg [[L1:![0-9]+]]
debug_step, loc "a.swift":1:2
// CHECK: "nop"{{.*}}, !dbg [[L2:![0-9]+]]
debug_step, loc "b.swift":3:4
%r = tuple ()
return %r : $()
}
// CHECK-DAG: [[L1]] = !DILocation(line: 1, column: 2, {{.*}})
// CHECK-DAG: [[L2]] = !DILocation(line: 3, column: 4, {{.*}})