]> granicus.if.org Git - clang/commitdiff
ObjectiveC driver. Scrap -fno-objc-legacy-dispatch for NeXT
authorFariborz Jahanian <fjahanian@apple.com>
Tue, 15 Oct 2013 17:16:30 +0000 (17:16 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Tue, 15 Oct 2013 17:16:30 +0000 (17:16 +0000)
runtime. It will be silently ignored and regardless
of deployment target. // rdar://14803286

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192719 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/ObjCRuntime.h
lib/Driver/Tools.cpp
test/Driver/darwin-objc-defaults.m
test/Driver/rewrite-objc.m

index 18ef64a3152764f9aee8008c47397737f976e023..52f35a0189a2c1604b5e305b37ea2f3d96658a48 100644 (file)
@@ -98,9 +98,8 @@ public:
           Arch == llvm::Triple::x86 ||
           Arch == llvm::Triple::x86_64)
         return false;
-      // Mac runtimes use legacy dispatch everywhere except x86-64
-    } else if (isNeXTFamily() && isNonFragile())
-        return Arch != llvm::Triple::x86_64;
+    }
+    // Mac runtimes use legacy dispatch everywhere now.
     return true;
   }
 
index 8cf35e8e26659b8ad0b24651576487b5633b1a10..9b23cbf931989265684d8eb74a8ca4825262f80b 100644 (file)
@@ -3195,8 +3195,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   ObjCRuntime objcRuntime = AddObjCRuntimeArgs(Args, CmdArgs, rewriteKind);
 
   // -fobjc-dispatch-method is only relevant with the nonfragile-abi, and
-  // legacy is the default.
-  if (objcRuntime.isNonFragile()) {
+  // legacy is the default. Next runtime is always legacy dispatch and
+  // -fno-objc-legacy-dispatch gets ignored silently.
+  if (objcRuntime.isNonFragile() && !objcRuntime.isNeXTFamily()) {
     if (!Args.hasFlag(options::OPT_fobjc_legacy_dispatch,
                       options::OPT_fno_objc_legacy_dispatch,
                       objcRuntime.isLegacyDispatchDefaultForArch(
index b523c0b482a12d42f6a54743006dc5a14c5d38f3..1742deb1b12e839ecbc95e31254edb4e87826a43 100644 (file)
@@ -37,7 +37,6 @@
 
 // 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
 // CHECK-CHECK-X86_64_OSX10_5: darwin-objc-defaults
 
 // RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
@@ -46,7 +45,6 @@
 
 // CHECK-CHECK-X86_64_OSX10_6: "-cc1"
 // CHECK-CHECK-X86_64_OSX10_6: -fobjc-runtime=macosx-10.6
-// CHECK-CHECK-X86_64_OSX10_6: -fobjc-dispatch-method=mixed
 // CHECK-CHECK-X86_64_OSX10_6: darwin-objc-defaults
 
 // RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
@@ -55,7 +53,6 @@
 
 // CHECK-CHECK-X86_64_IPHONE3_0: "-cc1"
 // CHECK-CHECK-X86_64_IPHONE3_0: -fobjc-runtime=ios-3.0
-// CHECK-CHECK-X86_64_IPHONE3_0: -fobjc-dispatch-method=mixed
 // CHECK-CHECK-X86_64_IPHONE3_0: darwin-objc-defaults
 
 // armv7
index 38e64c0e4021707e3b19580cde1c036450fa4f00..95db58294d2adc14145c4a6bc714b5b0c6b91cb4 100644 (file)
@@ -3,4 +3,4 @@
 // TEST0: clang{{.*}}" "-cc1"
 // TEST0: "-rewrite-objc"
 // FIXME: CHECK-NOT is broken somehow, it doesn't work here. Check adjacency instead.
-// TEST0: "-fmessage-length" "0" "-stack-protector" "1" "-mstackrealign" "-fblocks" "-fobjc-runtime=macosx" "-fobjc-dispatch-method=mixed" "-fencode-extended-block-signature" "-fno-objc-infer-related-result-type" "-fobjc-exceptions" "-fexceptions" "-fdiagnostics-show-option"
+// TEST0: "-fmessage-length" "0" "-stack-protector" "1" "-mstackrealign" "-fblocks" "-fobjc-runtime=macosx" "-fencode-extended-block-signature" "-fno-objc-infer-related-result-type" "-fobjc-exceptions" "-fexceptions" "-fdiagnostics-show-option"