[cfe-commits] r141053 - in /cfe/trunk: include/clang/Basic/DiagnosticDriverKinds.td lib/Driver/Tools.cpp

Chad Rosier mcrosier at apple.com
Mon Oct 3 18:01:31 PDT 2011


Author: mcrosier
Date: Mon Oct  3 20:01:30 2011
New Revision: 141053

URL: http://llvm.org/viewvc/llvm-project?rev=141053&view=rev
Log:
[driver] Emit a warning if the user has requested debug information and we're
using the integrated assembler.
rdar://10216353

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=141053&r1=141052&r2=141053&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Mon Oct  3 20:01:30 2011
@@ -122,6 +122,8 @@
   "Objective-C garbage collection is not supported on this platform, ignoring '%0'">;
 def warn_drv_pch_not_first_include : Warning<
   "precompiled header '%0' was ignored because '%1' is not first '-include'">;
+def warn_drv_no_debug_w_integrated_as : Warning<
+  "ignoring unsupported -g option with integrated assembler">;
 
 def note_drv_command_failed_diag_msg : Note<
   "diagnostic msg: %0">;

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=141053&r1=141052&r2=141053&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Oct  3 20:01:30 2011
@@ -2318,7 +2318,11 @@
   // Ignore explicit -force_cpusubtype_ALL option.
   (void) Args.hasArg(options::OPT_force__cpusubtype__ALL);
 
-  // FIXME: Add -g support, once we have it.
+  // FIXME: Add -g support, once we have it.  For now, emit a warning indicating
+  // the integrated assembler doesn't support debug info.
+  if (Args.hasArg(options::OPT_g_Group)) {
+    getToolChain().getDriver().Diag(diag::warn_drv_no_debug_w_integrated_as);
+  }
 
   // FIXME: Add -static support, once we have it.
 





More information about the cfe-commits mailing list