Skip to content

Commit efe5661

Browse files
authored
Merge pull request #18722 from aschwaighofer/test_case_coro_alloca_free_fix
2 parents e04b4c8 + 903b509 commit efe5661

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/IRGen/modifyaccessor.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// RUN: %target-swift-frontend -emit-ir -disable-llvm-optzns -primary-file %s | %FileCheck %s
2+
extension Dictionary {
3+
subscript(alternate key: Key) -> Value? {
4+
get {
5+
return self[key]
6+
}
7+
_modify {
8+
var value: Value? = nil
9+
yield &value
10+
}
11+
}
12+
}
13+
14+
// CHECK-LABEL: define {{.*}}SSD14modifyaccessorE9alternateq_Sgx_tciM
15+
// CHECK: [[COROALLOCA:%.*]] = call token @llvm.coro.alloca.alloc
16+
// CHECK: call void @llvm.coro.alloca.free(token [[COROALLOCA]])

0 commit comments

Comments
 (0)