Files
swift-mirror/test/SILGen/versioned_attribute.swift
Kavon Farvardin d2bd562799 Test: send shadow RUN lines to /dev/null
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.
2026-06-30 17:40:48 -07:00

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) -> ()