]> granicus.if.org Git - clang/commitdiff
[driver] Emit a warning if the user has requested debug information and we're
authorChad Rosier <mcrosier@apple.com>
Tue, 4 Oct 2011 01:01:30 +0000 (01:01 +0000)
committerChad Rosier <mcrosier@apple.com>
Tue, 4 Oct 2011 01:01:30 +0000 (01:01 +0000)
using the integrated assembler.
rdar://10216353

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

include/clang/Basic/DiagnosticDriverKinds.td
lib/Driver/Tools.cpp

index f76af053d97585170b54df3b5db455b2804e16d0..81a9d3a19d5700ef1f7199e25ddd09d01591d2ed 100644 (file)
@@ -122,6 +122,8 @@ def warn_drv_objc_gc_unsupported : Warning<
   "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">;
index e193c0f505a721df0f9846e5b7cbc3a2b55296e8..08d95f51e207d7c9cb9b8bcc5daa7e29247e1eac 100644 (file)
@@ -2318,7 +2318,11 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
   // 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.