mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
IRGen: Backward-deploy fix using open-coded accessors.
If we mangled an opaque associated type while targeting an older OS, we can use a \9 accessor reference string to instantiate the associated type.
This commit is contained in:
@@ -351,6 +351,8 @@ swift::getSwiftRuntimeCompatibilityVersionForTarget(const llvm::Triple &Triple){
|
||||
if (Major == 10) {
|
||||
if (Minor <= 14) {
|
||||
return llvm::VersionTuple(5, 0);
|
||||
} else if (Minor <= 15) {
|
||||
return llvm::VersionTuple(5, 1);
|
||||
} else {
|
||||
return None;
|
||||
}
|
||||
@@ -361,6 +363,8 @@ swift::getSwiftRuntimeCompatibilityVersionForTarget(const llvm::Triple &Triple){
|
||||
Triple.getiOSVersion(Major, Minor, Micro);
|
||||
if (Major <= 12) {
|
||||
return llvm::VersionTuple(5, 0);
|
||||
} else if (Major <= 13) {
|
||||
return llvm::VersionTuple(5, 1);
|
||||
} else {
|
||||
return None;
|
||||
}
|
||||
@@ -368,6 +372,8 @@ swift::getSwiftRuntimeCompatibilityVersionForTarget(const llvm::Triple &Triple){
|
||||
Triple.getWatchOSVersion(Major, Minor, Micro);
|
||||
if (Major <= 5) {
|
||||
return llvm::VersionTuple(5, 0);
|
||||
} else if (Major <= 6) {
|
||||
return llvm::VersionTuple(5, 1);
|
||||
} else {
|
||||
return None;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user