Merge pull request #41673 from tshortli/inlining-availability-checking

Add -target-min-inlining-version to aid type checking for inlinable functions in resilient libraries
This commit is contained in:
Allan Shortlidge
2022-03-07 17:30:59 -08:00
committed by GitHub
17 changed files with 954 additions and 133 deletions

View File

@@ -134,6 +134,13 @@ namespace swift {
/// The SDK canonical name, if known.
std::string SDKName;
/// The lowest target OS version that code in this module may be inlined
/// into. In resilient modules, this should match the minimum
/// deployment target of the *first* resilient version of the module, since
/// clients may need to interoperate with versions as far back as that
/// deployment target.
llvm::VersionTuple MinimumInliningTargetVersion;
/// The alternate name to use for the entry point instead of main.
std::string entryPointFunctionName = "main";

View File

@@ -55,6 +55,9 @@ namespace swift {
bool triplesAreValidForZippering(const llvm::Triple &target,
const llvm::Triple &targetVariant);
const Optional<llvm::VersionTuple>
minimumABIStableOSVersionForTriple(const llvm::Triple &triple);
/// Returns true if the given triple represents an OS that has all the
/// "built-in" ABI-stable libraries (stdlib and _Concurrency)
/// (eg. in /usr/lib/swift).