mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
By default the compiler will now replace the bodies of unavailable functions with stubs that call `_diagnoseUnavailableCodeReached()` instead. Resolves rdar://116019744
17 lines
533 B
Swift
17 lines
533 B
Swift
// RUN: %target-swift-frontend -emit-ir -unavailable-decl-optimization=none %s -target x86_64-apple-macos10.15 | %FileCheck %s
|
|
// RUN: %target-swift-frontend -emit-ir -unavailable-decl-optimization=none %s -target x86_64-apple-macos11 | %FileCheck %s
|
|
|
|
// REQUIRES: OS=macosx
|
|
// REQUIRES: CPU=x86_64
|
|
// UNSUPPORTED: use_os_stdlib
|
|
|
|
@inline(never)
|
|
func blackHole<T>(_ t: T.Type) {}
|
|
|
|
@available(macOS, unavailable)
|
|
public func useFloat16() {
|
|
blackHole(Float16.self)
|
|
}
|
|
|
|
// CHECK-LABEL: @"$ss7Float16VN" = extern_weak global %swift.type
|