Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdlib/public/core/FloatingPointTypes.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ extension ${Self} : ConcurrentValue { }
${SelfDocComment}
@frozen
% if bits == 16:
@available(iOS 14, tvOS 14, watchOS 7, *)
@available(macOS 11, iOS 14, tvOS 14, watchOS 7, *)
@available(macOS, unavailable)
@available(macCatalyst, unavailable)
% else:
Expand Down
15 changes: 15 additions & 0 deletions test/IRGen/float16_macos.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// RUN: %target-swift-frontend -emit-ir %s -target x86_64-apple-macos10.15 | %FileCheck %s --check-prefix=CHECK10
// RUN: %target-swift-frontend -emit-ir %s -target x86_64-apple-macos11 | %FileCheck %s --check-prefix=CHECK11

// REQUIRES: OS=macosx
// REQUIRES: CPU=x86_64
// UNSUPPORTED: use_os_stdlib

@available(macOS 11, *)
public struct Float16Wrapper {
@available(macOS, unavailable)
var x: Float16
}

// CHECK10-LABEL: @"$ss7Float16VMn" = extern_weak global %swift.type_descriptor
// CHECK11-LABEL: @"$ss7Float16VMn" = external global %swift.type_descriptor