mirror of
https://github.com/apple/swift.git
synced 2026-10-18 17:49:23 +02:00
The opaque values test coverage I initially added will emit to stdout, which is noisy for people's logs if the test is failing for some other reason.
28 lines
1.2 KiB
Swift
28 lines
1.2 KiB
Swift
// RUN: %target-swift-emit-silgen-ossa -o /dev/null -enable-sil-opaque-values %s
|
|
// RUN: %target-swift-emit-silgen -emit-verbose-sil %s | %FileCheck %s
|
|
|
|
// Check that @usableFromInline entities have public linkage.
|
|
// CHECK-LABEL: sil [ossa] @$s19versioned_attribute25referencedFromTransparentyyF : $@convention(thin) () -> () {
|
|
@usableFromInline func referencedFromTransparent() {}
|
|
|
|
// CHECK-LABEL: sil [serialized] [ossa] @$s19versioned_attribute23referencesVersionedFuncyycyF : $@convention(thin) () -> @owned @callee_guaranteed () -> () {
|
|
@inlinable public func referencesVersionedFunc() -> () -> () {
|
|
return referencedFromTransparent
|
|
}
|
|
|
|
@usableFromInline class Horse {
|
|
var mouth: AnyObject?
|
|
}
|
|
|
|
@usableFromInline class GiftHorse {
|
|
var mouth: AnyObject?
|
|
|
|
deinit {}
|
|
}
|
|
|
|
// CHECK-LABEL: sil [ossa] @$s19versioned_attribute5HorseCfd : $@convention(method) (@guaranteed Horse) -> @owned Builtin.NativeObject
|
|
// CHECK-LABEL: sil [ossa] @$s19versioned_attribute5HorseCfD : $@convention(method) (@owned Horse) -> ()
|
|
|
|
// CHECK-LABEL: sil [ossa] @$s19versioned_attribute9GiftHorseCfd : $@convention(method) (@guaranteed GiftHorse) -> @owned Builtin.NativeObject
|
|
// CHECK-LABEL: sil [ossa] @$s19versioned_attribute9GiftHorseCfD : $@convention(method) (@owned GiftHorse) -> ()
|