[cfe-commits] r162651 - in /cfe/trunk: include/clang/Basic/DiagnosticDriverKinds.td lib/Driver/ToolChains.cpp test/Driver/arc.c

John McCall rjmccall at apple.com
Sun Aug 26 18:56:21 PDT 2012


Author: rjmccall
Date: Sun Aug 26 20:56:21 2012
New Revision: 162651

URL: http://llvm.org/viewvc/llvm-project?rev=162651&view=rev
Log:
Tweak the ARC-requires-10.6 diagnostic according to Jordan's review.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
    cfe/trunk/lib/Driver/ToolChains.cpp
    cfe/trunk/test/Driver/arc.c

Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=162651&r1=162650&r2=162651&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Sun Aug 26 20:56:21 2012
@@ -93,8 +93,8 @@
   "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<

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=162651&r1=162650&r2=162651&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Sun Aug 26 20:56:21 2012
@@ -954,8 +954,7 @@
 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

Modified: cfe/trunk/test/Driver/arc.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/arc.c?rev=162651&r1=162650&r2=162651&view=diff
==============================================================================
--- cfe/trunk/test/Driver/arc.c (original)
+++ cfe/trunk/test/Driver/arc.c Sun Aug 26 20:56:21 2012
@@ -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





More information about the cfe-commits mailing list