summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGObjCMac.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjCMac.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp
index f038509edc5..d70537e49c9 100644
--- a/clang/lib/CodeGen/CGObjCMac.cpp
+++ b/clang/lib/CodeGen/CGObjCMac.cpp
@@ -4264,7 +4264,10 @@ void CGObjCNonFragileABIMac::FinishNonFragileABIModule() {
bool CGObjCNonFragileABIMac::LegacyDispatchedSelector(Selector Sel) {
if (CGM.getCodeGenOpts().ObjCLegacyDispatch)
return true;
-
+ /* Leopard */
+ if (CGM.getContext().Target.getTriple().getDarwinMajorNumber() <= 9)
+ return false;
+
if (NonLegacyDispatchMethods.empty()) {
NonLegacyDispatchMethods.insert(GetNullarySelector("alloc"));
NonLegacyDispatchMethods.insert(GetNullarySelector("class"));
OpenPOWER on IntegriCloud