mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-13 19:24:21 +00:00
Add top-level driver option '--serialize-diagnostics' for serialize compiler diagnostics to a file.
llvm-svn: 144339
This commit is contained in:
parent
d9a9be269c
commit
e73d9ed1a2
@ -232,7 +232,7 @@ def dump_build_information : Separate<"-dump-build-information">,
|
||||
HelpText<"output a dump of some build information to a file">;
|
||||
def diagnostic_log_file : Separate<"-diagnostic-log-file">,
|
||||
HelpText<"Filename (or -) to log diagnostics to">;
|
||||
def diagnostic_serialized_file : Separate<"-diagnostic-serialized-file">,
|
||||
def diagnostic_serialized_file : Separate<"-serialize-diagnostic-file">,
|
||||
MetaVarName<"<filename>">,
|
||||
HelpText<"File for serializing diagnostics in a binary format">;
|
||||
def fno_show_column : Flag<"-fno-show-column">,
|
||||
|
@ -846,6 +846,8 @@ def _relocatable_pch : Flag<"--relocatable-pch">,
|
||||
def _resource_EQ : Joined<"--resource=">, Alias<fcompile_resource_EQ>;
|
||||
def _resource : Separate<"--resource">, Alias<fcompile_resource_EQ>;
|
||||
def _save_temps : Flag<"--save-temps">, Alias<save_temps>;
|
||||
def _serialize_diags : Separate<"--serialize-diagnostics">, Flags<[DriverOption]>,
|
||||
HelpText<"Serialize compiler diagnostics to a file">;
|
||||
def _shared : Flag<"--shared">, Alias<shared>;
|
||||
def _signed_char : Flag<"--signed-char">, Alias<fsigned_char>;
|
||||
def _specs_EQ : Joined<"--specs=">, Alias<specs_EQ>;
|
||||
|
@ -2213,6 +2213,12 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
|
||||
Args.AddLastArg(CmdArgs, options::OPT_dM);
|
||||
Args.AddLastArg(CmdArgs, options::OPT_dD);
|
||||
|
||||
// Handle serialized diagnostics.
|
||||
if (Arg *A = Args.getLastArg(options::OPT__serialize_diags)) {
|
||||
CmdArgs.push_back("-serialize-diagnostic-file");
|
||||
CmdArgs.push_back(Args.MakeArgString(A->getValue(Args)));
|
||||
}
|
||||
|
||||
// Forward -Xclang arguments to -cc1, and -mllvm arguments to the LLVM option
|
||||
// parser.
|
||||
|
Loading…
Reference in New Issue
Block a user