r200854 - Objective-C driver. Do not use legacy dispatch for
Fariborz Jahanian
fjahanian at apple.com
Wed Feb 5 09:13:42 PST 2014
Author: fjahanian
Date: Wed Feb 5 11:13:42 2014
New Revision: 200854
URL: http://llvm.org/viewvc/llvm-project?rev=200854&view=rev
Log:
Objective-C driver. Do not use legacy dispatch for
10.5 or less for x86_64 arch. // rdar://15852259
Modified:
cfe/trunk/include/clang/Basic/ObjCRuntime.h
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=200854&r1=200853&r2=200854&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/ObjCRuntime.h (original)
+++ cfe/trunk/include/clang/Basic/ObjCRuntime.h Wed Feb 5 11:13:42 2014
@@ -100,10 +100,10 @@ public:
return false;
}
else if ((getKind() == MacOSX) && isNonFragile() &&
- (getVersion() >= VersionTuple(10, 5)) &&
+ (getVersion() >= VersionTuple(10, 0)) &&
(getVersion() < VersionTuple(10, 6)))
return Arch != llvm::Triple::x86_64;
- // Except for deployment target of 10.5,
+ // Except for deployment target of 10.5 or less,
// Mac runtimes use legacy dispatch everywhere now.
return true;
}
Modified: cfe/trunk/test/Driver/darwin-objc-defaults.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-objc-defaults.m?rev=200854&r1=200853&r2=200854&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-objc-defaults.m (original)
+++ cfe/trunk/test/Driver/darwin-objc-defaults.m Wed Feb 5 11:13:42 2014
@@ -32,9 +32,17 @@
// x86_64
// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
+// RUN: -arch x86_64 -mmacosx-version-min=10.4 2> %t
+// RUN: FileCheck --check-prefix CHECK-CHECK-X86_64_OSX10_4 < %t %s
+
+// CHECK-CHECK-X86_64_OSX10_4: "-cc1"
+// CHECK-CHECK-X86_64_OSX10_4: -fobjc-dispatch-method=non-legacy
+
+// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
// RUN: -arch x86_64 -mmacosx-version-min=10.5 2> %t
// RUN: FileCheck --check-prefix CHECK-CHECK-X86_64_OSX10_5 < %t %s
+
// CHECK-CHECK-X86_64_OSX10_5: "-cc1"
// CHECK-CHECK-X86_64_OSX10_5: -fobjc-runtime=macosx-10.5
// CHECK-CHECK-X86_64_OSX10_5: -fobjc-dispatch-method=non-legacy
More information about the cfe-commits
mailing list