Fixup for 3904fe83f (AST: Centralize ABI-related deployment target checks)

This commit is contained in:
Kuba Mracek
2020-03-04 16:30:07 -08:00
parent 0d400ca310
commit acfc4a98b1

View File

@@ -375,37 +375,3 @@ std::pair<bool, bool> LangOptions::setTarget(llvm::Triple triple) {
return { false, false };
}
bool LangOptions::doesTargetSupportObjCMetadataUpdateCallback() const {
if (Target.getArchName() == "arm64e")
return true;
if (Target.isMacOSX())
return !Target.isMacOSXVersionLT(10, 14, 4);
if (Target.isiOS()) // also returns true on tvOS
return !Target.isOSVersionLT(12, 2);
if (Target.isWatchOS())
return !Target.isOSVersionLT(5, 2);
// Don't assert if we're running on a non-Apple platform; we still
// want to allow running tests that -enable-objc-interop.
return false;
}
bool LangOptions::doesTargetSupportObjCGetClassHook() const {
return doesTargetSupportObjCMetadataUpdateCallback();
}
bool LangOptions::doesTargetSupportObjCClassStubs() const {
if (Target.getArchName() == "arm64e")
return true;
if (Target.isMacOSX())
return !Target.isMacOSXVersionLT(10, 15);
if (Target.isiOS()) // also returns true on tvOS
return !Target.isOSVersionLT(13);
if (Target.isWatchOS())
return !Target.isOSVersionLT(6);
// Don't assert if we're running on a non-Apple platform; we still
// want to allow running tests that -enable-objc-interop.
return false;
}