Check for darwin befoer cheking for version.

(related to radar 7866951).

llvm-svn: 101799
This commit is contained in:
Fariborz Jahanian 2010-04-19 18:38:31 +00:00
parent 0557cd7d89
commit fd34b0ac84
1 changed files with 2 additions and 1 deletions

View File

@ -4265,7 +4265,8 @@ bool CGObjCNonFragileABIMac::LegacyDispatchedSelector(Selector Sel) {
if (CGM.getCodeGenOpts().ObjCLegacyDispatch)
return true;
/* Leopard */
if (CGM.getContext().Target.getTriple().getDarwinMajorNumber() <= 9)
if (CGM.getContext().Target.getTriple().getOS() == llvm::Triple::Darwin &&
CGM.getContext().Target.getTriple().getDarwinMajorNumber() <= 9)
return false;
if (NonLegacyDispatchMethods.empty()) {