forked from OSchip/llvm-project
parent
ef986e8fc3
commit
068ae76e02
|
@ -18,10 +18,14 @@ def err_fe_error_reading_stdin : Error<"error reading stdin">;
|
|||
def err_fe_error_backend : Error<"error in backend: %0">, DefaultFatal;
|
||||
def err_fe_invalid_ast_file : Error<"invalid AST file: '%0'">, DefaultFatal;
|
||||
def err_fe_invalid_ast_action : Error<"invalid action for AST input">, DefaultFatal;
|
||||
def err_fe_invalid_code_complete_file
|
||||
def err_fe_invalid_code_complete_file
|
||||
: Error<"cannot locate code-completion file %0">, DefaultFatal;
|
||||
def err_fe_dependency_file_requires_MT : Error<
|
||||
"-dependency-file requires at least one -MT option">;
|
||||
def err_fe_incompatible_options : Error<
|
||||
"'%0' cannot be used with '%1'">, DefaultFatal;
|
||||
def err_fe_no_fixit_and_codegen : Error<
|
||||
"FIX-ITs cannot be applied when generating code">;
|
||||
|
||||
def note_fixit_applied : Note<"FIX-IT applied suggested code changes">;
|
||||
def note_fixit_in_macro : Note<
|
||||
|
|
|
@ -558,6 +558,12 @@ static ASTConsumer *CreateConsumerAction(const CompilerInvocation &CompOpts,
|
|||
OS.reset(ComputeOutFile(CompOpts, InFile, "bc", true, OutPath));
|
||||
}
|
||||
|
||||
// Fix-its can change semantics, disallow with any IRgen action.
|
||||
if (FixItAll || !FixItAtLocations.empty()) {
|
||||
PP.getDiagnostics().Report(diag::err_fe_no_fixit_and_codegen);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return CreateBackendConsumer(Act, PP.getDiagnostics(), PP.getLangOptions(),
|
||||
CompOpts.getCompileOpts(), InFile, OS.get(),
|
||||
Context);
|
||||
|
|
Loading…
Reference in New Issue