Эх сурвалжийг харах

Tweak the ARC-requires-10.6 diagnostic according to Jordan's review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162651 91177308-0d34-0410-b5e6-96231b3b80d8
John McCall 13 жил өмнө
parent
commit
80fd37a571

+ 2 - 2
include/clang/Basic/DiagnosticDriverKinds.td

@@ -93,8 +93,8 @@ def err_drv_objc_gc_arr : Error<
   "cannot specify both '-fobjc-arc' and '%0'">;
 def err_arc_unsupported_on_runtime : Error<
   "-fobjc-arc is not supported on platforms using the legacy runtime">;
-def err_arc_unsupported_on_toolchain : Error<
-  "-fobjc-arc is not supported on %select{versions of Mac OS prior to 10.6}0">;
+def err_arc_unsupported_on_toolchain : Error< // feel free to generalize this
+  "-fobjc-arc is not supported on versions of OS X prior to 10.6">;
 def err_drv_mg_requires_m_or_mm : Error<
   "option '-MG' requires '-M' or '-MM'">;
 def err_drv_asan_android_requires_pie : Error<

+ 1 - 2
lib/Driver/ToolChains.cpp

@@ -954,8 +954,7 @@ bool Darwin::SupportsObjCGC() const {
 void Darwin::CheckObjCARC() const {
   if (isTargetIPhoneOS() || !isMacosxVersionLT(10, 6))
     return;
-  getDriver().Diag(diag::err_arc_unsupported_on_toolchain)
-    << 0; // "versions of Mac OS X prior to 10.6"
+  getDriver().Diag(diag::err_arc_unsupported_on_toolchain);
 }
 
 std::string

+ 1 - 1
test/Driver/arc.c

@@ -14,4 +14,4 @@
 // NOTOBJC-NOT: error: -fobjc-arc is not supported on platforms using the legacy runtime
 // NOTOBJC: invalid preprocessing directive
 
-// UNSUPPORTED: error: -fobjc-arc is not supported on versions of Mac OS prior to 10.6
+// UNSUPPORTED: error: -fobjc-arc is not supported on versions of OS X prior to 10.6