aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/Basic/DiagnosticDriverKinds.td2
-rw-r--r--lib/Driver/Tools.cpp6
2 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/Basic/DiagnosticDriverKinds.td b/include/clang/Basic/DiagnosticDriverKinds.td
index f76af053d9..81a9d3a19d 100644
--- a/include/clang/Basic/DiagnosticDriverKinds.td
+++ b/include/clang/Basic/DiagnosticDriverKinds.td
@@ -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">;
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index e193c0f505..08d95f51e2 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -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.