[cfe-commits] r131662 - in /cfe/trunk: include/clang/Driver/CC1AsOptions.td lib/Driver/Tools.cpp tools/driver/cc1as_main.cpp
Joerg Sonnenberger
joerg at bec.de
Thu May 19 11:42:30 PDT 2011
Author: joerg
Date: Thu May 19 13:42:29 2011
New Revision: 131662
URL: http://llvm.org/viewvc/llvm-project?rev=131662&view=rev
Log:
Support -fatal-warnings for the assembler frontend
Modified:
cfe/trunk/include/clang/Driver/CC1AsOptions.td
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/tools/driver/cc1as_main.cpp
Modified: cfe/trunk/include/clang/Driver/CC1AsOptions.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1AsOptions.td?rev=131662&r1=131661&r2=131662&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1AsOptions.td (original)
+++ cfe/trunk/include/clang/Driver/CC1AsOptions.td Thu May 19 13:42:29 2011
@@ -77,3 +77,6 @@
def no_exec_stack : Flag<"--noexecstack">,
HelpText<"Mark the file as not needing an executable stack">;
+
+def fatal_warnings : Flag<"-fatal-warnings">,
+ HelpText<"Consider warnings as errors">;
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=131662&r1=131661&r2=131662&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu May 19 13:42:29 2011
@@ -1020,6 +1020,9 @@
// Do nothing, this is the default and we don't support anything else.
} else if (Value == "-L") {
CmdArgs.push_back("-msave-temp-labels");
+ } else if (Value == "-fatal-warnings") {
+ CmdArgs.push_back("-mllvm");
+ CmdArgs.push_back("-fatal-assembler-warnings");
} else {
D.Diag(clang::diag::err_drv_unsupported_option_argument)
<< A->getOption().getName() << Value;
Modified: cfe/trunk/tools/driver/cc1as_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1as_main.cpp?rev=131662&r1=131661&r2=131662&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1as_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1as_main.cpp Thu May 19 13:42:29 2011
@@ -172,6 +172,8 @@
}
}
Opts.LLVMArgs = Args->getAllArgValues(OPT_mllvm);
+ if (Args->hasArg(OPT_fatal_warnings))
+ Opts.LLVMArgs.push_back("-fatal-assembler-warnings");
Opts.OutputPath = Args->getLastArgValue(OPT_o);
if (Arg *A = Args->getLastArg(OPT_filetype)) {
StringRef Name = A->getValue(*Args);
More information about the cfe-commits
mailing list