forked from OSchip/llvm-project
Support -fatal-warnings for the assembler frontend
llvm-svn: 131662
This commit is contained in:
parent
1b27dac253
commit
b487d2d815
|
@ -77,3 +77,6 @@ def relax_all : Flag<"-relax-all">,
|
|||
|
||||
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">;
|
||||
|
|
|
@ -1020,6 +1020,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
// 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;
|
||||
|
|
|
@ -172,6 +172,8 @@ void AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts,
|
|||
}
|
||||
}
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue