Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Utils/InstOptUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,7 @@ void swift::insertDeallocOfCapturedArguments(PartialApplyInst *pai,
} else {
insertionPoint = terminator;
}
auto builder = SILBuilder(insertionPoint);
SILBuilderWithScope builder(insertionPoint);
builder.createDeallocStack(CleanupLocation(insertionPoint->getLoc()),
arg.get());
}
Expand Down
8 changes: 4 additions & 4 deletions test/SILOptimizer/closure-lifetime-fixup.sil
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-sil-opt -enable-sil-verify-all -closure-lifetime-fixup %s | %FileCheck %s
// RUN: %target-sil-opt -enable-sil-verify-all -sil-print-debuginfo -closure-lifetime-fixup %s | %FileCheck %s

sil_stage raw

Expand Down Expand Up @@ -261,16 +261,16 @@ bb3:
// CHECK: [[STACK:%[^,]+]] = alloc_stack $Self
// CHECK: try_apply undef() {{.*}}, normal [[SUCCESS_1:bb[0-9]+]], error [[FAILURE_1:bb[0-9]+]]
// CHECK: [[SUCCESS_1]]
// CHECK: copy_addr [[INSTANCE]] to [init] [[STACK]] : $*Self
// CHECK: copy_addr [[INSTANCE]] to [init] [[STACK]] : $*Self, {{.*}} scope [[STACK_SCOPE:[0-9]+]]
// CHECK: [[CLOSURE:%[^,]+]] = partial_apply [callee_guaranteed] [on_stack] undef<Self>([[STACK]])
// CHECK: [[DEPENDENCY:%[^,]+]] = mark_dependence [[CLOSURE]] {{.*}} on [[STACK]]
// CHECK: try_apply undef([[DEPENDENCY]]) {{.*}}, normal [[SUCCESS_2:bb[0-9]+]], error [[FAILURE_2:bb[0-9]+]]
// CHECK: [[SUCCESS_2]]
// CHECK: dealloc_stack [[CLOSURE]]
// CHECK: destroy_addr [[STACK]]
// CHECK: dealloc_stack [[STACK]] : $*Self
// CHECK: dealloc_stack [[STACK]] : $*Self, {{.*}} scope [[STACK_SCOPE]]
// CHECK: [[FAILURE_1]]
// CHECK: dealloc_stack [[STACK]]
// CHECK: dealloc_stack [[STACK]] : $*Self, {{.*}} scope [[STACK_SCOPE]]
// CHECK: throw
// CHECK: [[FAILURE_2]]
// CHECK-NOT: dealloc_stack
Expand Down