Files
swift-mirror/test/IRGen/float16_macos.swift
Allan Shortlidge 0c910e54c6 Frontend: Enable -unavailable-decl-optimization=stub by default.
By default the compiler will now replace the bodies of unavailable functions
with stubs that call `_diagnoseUnavailableCodeReached()` instead.

Resolves rdar://116019744
2023-10-18 18:35:14 -07:00

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