We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e04b4c8 + 903b509 commit efe5661Copy full SHA for efe5661
test/IRGen/modifyaccessor.swift
@@ -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