Files
swift-mirror/test/SIL/OwnershipVerifier/borrow_and_concurrency.sil
2022-06-12 05:41:53 -07:00

27 lines
680 B
Plaintext

// RUN: %target-sil-opt -o /dev/null %s
// REQUIRES: concurrency
sil_stage canonical
import Builtin
import Swift
import SwiftShims
final actor Storage {
@_hasStorage @_hasInitialValue final var resolved: [String] { get set }
init()
}
sil hidden [ossa] @$s3nix3FooV7StorageC3getySSSgSiYF : $@convention(method) @async (@guaranteed Storage) -> () {
bb0(%0 : @guaranteed $Storage):
hop_to_executor %0 : $Storage
%2 = ref_element_addr %0 : $Storage, #Storage.resolved
%3 = begin_access [read] [dynamic] %2 : $*Array<String>
%4 = load_borrow %3 : $*Array<String>
end_borrow %4 : $Array<String>
end_access %3 : $*Array<String>
%r = tuple ()
return %r : $()
}