Skip to content

Commit 54f18b0

Browse files
authored
Merge pull request #65181 from nate-chandler/rdar108043268
[MemAccessUtils] Handle debug_step in visitAccessedAddress.
2 parents 17c5010 + 9d3722f commit 54f18b0

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

lib/SIL/Utils/MemAccessUtils.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2691,6 +2691,7 @@ void swift::visitAccessedAddress(SILInstruction *I,
26912691
case SILInstructionKind::CopyBlockInst:
26922692
case SILInstructionKind::CopyBlockWithoutEscapingInst:
26932693
case SILInstructionKind::CopyValueInst:
2694+
case SILInstructionKind::DebugStepInst:
26942695
case SILInstructionKind::DeinitExistentialAddrInst:
26952696
case SILInstructionKind::DeinitExistentialValueInst:
26962697
case SILInstructionKind::DestroyAddrInst:

test/SILOptimizer/deinit_barrier.sil

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,15 @@ sil [ossa] @test_hop_to_executor : $@convention(thin) () -> () {
103103
%retval = tuple ()
104104
return %retval : $()
105105
}
106+
107+
// CHECK-LABEL: begin running test 1 of 1 on test_instructions_1: is-deinit-barrier
108+
// CHECK: debug_step
109+
// CHECK: false
110+
// CHECK-LABEL: end running test 1 of 1 on test_instructions_1: is-deinit-barrier
111+
sil [ossa] @test_instructions_1 : $@convention(thin) () -> () {
112+
entry:
113+
test_specification "is-deinit-barrier @instruction"
114+
debug_step
115+
%retval = tuple ()
116+
return %retval : $()
117+
}

0 commit comments

Comments
 (0)