mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
e233b0b4d4
Fixes a false "deinit of non-copyable type not visible in the current module" error rdar://171009835
27 lines
488 B
Plaintext
27 lines
488 B
Plaintext
// RUN: %target-sil-opt -enable-experimental-feature Embedded -embedded-swift-diagnostics -I %test-resource-dir/embedded %s -o /dev/null
|
|
|
|
// REQUIRES: swift_feature_Embedded
|
|
|
|
sil_stage canonical
|
|
|
|
import Builtin
|
|
import Swift
|
|
import SwiftShims
|
|
|
|
struct MyStruct: ~Copyable {
|
|
deinit
|
|
}
|
|
|
|
sil [ossa] @testit : $@convention(thin) (@owned MyStruct) -> @owned MyStruct {
|
|
bb0(%0 : @owned $MyStruct):
|
|
cond_br undef, bb1, bb2
|
|
|
|
bb1:
|
|
destroy_value [dead_end] %0
|
|
unreachable
|
|
|
|
bb2:
|
|
return %0
|
|
}
|
|
|