Skip to content

Frontend: Separate macCatalyst -target-min-inlining-version floor #42084

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2022
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
5 changes: 5 additions & 0 deletions lib/Basic/Platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ swift::minimumAvailableOSVersionForTriple(const llvm::Triple &triple) {
if (triple.isMacOSX())
return llvm::VersionTuple(10, 10, 0);

// Mac Catalyst was introduced with an iOS deployment target of 13.1.
if (tripleIsMacCatalystEnvironment(triple))
return llvm::VersionTuple(13, 1);

// Note: this must come before checking iOS since that returns true for
// both iOS and tvOS.
if (triple.isTvOS())
Expand Down Expand Up @@ -133,6 +137,7 @@ DarwinPlatformKind swift::getDarwinPlatformKind(const llvm::Triple &triple) {

if (tripleIsiOSSimulator(triple))
return DarwinPlatformKind::IPhoneOSSimulator;

return DarwinPlatformKind::IPhoneOS;
}

Expand Down
1 change: 0 additions & 1 deletion test/attr/attr_inlinable_available.swift
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ public func deployedUseAfterDeploymentTarget(

//
// Uses in inlinable functions are based on the minimum inlining target
// (i.e. the first ABI-stable version, in this case)
//

@inlinable public func inlinedUseNoAvailable( // expected-note 8 {{add @available attribute}}
Expand Down
Loading