NeXT: Clean up dispatch method policy selection.
 - Replace -cc1 level -fobjc-legacy-dispatch with -fobjc-dispatch-method={legacy,non-legacy,mixed}.

 - Lift "mixed" vs "non-mixed" policy choice up to driver level, instead of being buried in CGObjCMac.cpp.

 - No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102255 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index 9e61b89..a307b2b 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -168,6 +168,12 @@
     return (getTriple().getArch() == llvm::Triple::arm ||
             getTriple().getArch() == llvm::Triple::thumb);
   }
+  virtual bool UseObjCMixedDispatch() const {
+    // Mixed dispatch is only used on x86_64 for 10.6 and later.
+    return (!isTargetIPhoneOS() &&
+            getTriple().getArch() == llvm::Triple::x86_64 &&
+            !isMacosxVersionLT(10, 6));
+  }
   virtual bool IsUnwindTablesDefault() const;
   virtual unsigned GetDefaultStackProtectorLevel() const {
     // Stack protectors default to on for 10.6 and beyond.