Skip to content

Commit c641064

Browse files
committed
Frontend: Add a separate inlining version floor for the macCatalyst platform, which was introduced as 13.1. Create a variant of the tests for -target-min-inlining-version specifically for macCatalyst (unfortunately, covering the macCatalyst platform in the same test file is prohibitively difficult because the tests never run with macCatalyst as the host OS and therefore the target triple substitutions need to be explicit).
Resolves rdar://90858579
1 parent 3e739f6 commit c641064

File tree

3 files changed

+571
-1
lines changed

3 files changed

+571
-1
lines changed

lib/Basic/Platform.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ swift::minimumAvailableOSVersionForTriple(const llvm::Triple &triple) {
8484
if (triple.isMacOSX())
8585
return llvm::VersionTuple(10, 10, 0);
8686

87+
// Mac Catalyst was introduced with an iOS deployment target of 13.1.
88+
if (tripleIsMacCatalystEnvironment(triple))
89+
return llvm::VersionTuple(13, 1);
90+
8791
// Note: this must come before checking iOS since that returns true for
8892
// both iOS and tvOS.
8993
if (triple.isTvOS())
@@ -133,6 +137,7 @@ DarwinPlatformKind swift::getDarwinPlatformKind(const llvm::Triple &triple) {
133137

134138
if (tripleIsiOSSimulator(triple))
135139
return DarwinPlatformKind::IPhoneOSSimulator;
140+
136141
return DarwinPlatformKind::IPhoneOS;
137142
}
138143

test/attr/attr_inlinable_available.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ public func deployedUseAfterDeploymentTarget(
226226

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

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

0 commit comments

Comments
 (0)