On Jan 21, 2014, at 4:29 PM, Bob Wilson <[email protected]> wrote:
> > On Jan 21, 2014, at 4:13 PM, jahanian <[email protected]> wrote: > >> >> On Jan 21, 2014, at 4:08 PM, Bob Wilson <[email protected]> wrote: >> >>> >>> On Jan 20, 2014, at 11:32 AM, Fariborz Jahanian <[email protected]> wrote: >>> >>>> Author: fjahanian >>>> Date: Mon Jan 20 13:32:33 2014 >>>> New Revision: 199682 >>>> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=199682&view=rev >>>> Log: >>>> ObjectiveC driver. reinstate -fno-objc-legacy-dispatch behavior >>>> when the deployment target is 10.5. // rdar://15852259 >>>> >>>> Modified: >>>> cfe/trunk/include/clang/Basic/ObjCRuntime.h >>>> cfe/trunk/lib/Driver/Tools.cpp >>>> cfe/trunk/test/Driver/darwin-objc-defaults.m >>>> >>>> Modified: cfe/trunk/include/clang/Basic/ObjCRuntime.h >>>> URL: >>>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/ObjCRuntime.h?rev=199682&r1=199681&r2=199682&view=diff >>>> ============================================================================== >>>> --- cfe/trunk/include/clang/Basic/ObjCRuntime.h (original) >>>> +++ cfe/trunk/include/clang/Basic/ObjCRuntime.h Mon Jan 20 13:32:33 2014 >>>> @@ -99,6 +99,15 @@ public: >>>> Arch == llvm::Triple::x86_64) >>>> return false; >>>> } >>>> + else if (isNeXTFamily() && getVersion().getMajor() == 10) { >>>> + unsigned minor = 0; >>>> + if (getVersion().getMinor().hasValue()) >>>> + minor = getVersion().getMinor().getValue(); >>>> + if (minor == 5 && >>>> + (Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64)) >>>> + return false; >>>> + } >>>> + // Except for deployment target of 10.5, >>>> // Mac runtimes use legacy dispatch everywhere now. >>>> return true; >>>> } >>> >>> isNextFamily() returns true for iOS. We haven’t gotten to iOS 10 yet, but >>> in the interest of future-proofing, I think this needs to check >>> specifically for OS X. >> OK. >> >>> >>> The version check can just be "getVersion() == VersionTuple(10, 5)", can’t >>> it? >> >> No. This fails for, say, 10.5.2 (but not for pure 10.5). > > OK, well, how about checking for 10.5 <= version < 10.6? I just find the > getVersion().getMinor().hasValue() code really hard to read. In r199780. - Fariborz
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
