aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--lib/Frontend/CompilerInvocation.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 3386eff5ba..db937bc4c7 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -361,12 +361,6 @@ static void FrontendOptsToArgs(const FrontendOptions &Opts,
Res.push_back("-cxx-inheritance-view");
Res.push_back(Opts.ViewClassInheritance);
}
- for (unsigned i = 0, e = Opts.FixItLocations.size(); i != e; ++i) {
- Res.push_back("-fixit-at");
- Res.push_back(Opts.FixItLocations[i].FileName + ":" +
- llvm::utostr(Opts.FixItLocations[i].Line) + ":" +
- llvm::utostr(Opts.FixItLocations[i].Column));
- }
if (!Opts.CodeCompletionAt.FileName.empty()) {
Res.push_back("-code-completion-at");
Res.push_back(Opts.CodeCompletionAt.FileName + ":" +
@@ -910,6 +904,9 @@ ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, Diagnostic &Diags) {
Opts.ProgramAction = frontend::EmitLLVMOnly; break;
case OPT_emit_obj:
Opts.ProgramAction = frontend::EmitObj; break;
+ case OPT_fixit_EQ:
+ Opts.FixItSuffix = A->getValue(Args);
+ // fall-through!
case OPT_fixit:
Opts.ProgramAction = frontend::FixIt; break;
case OPT_emit_pch:
@@ -956,20 +953,6 @@ ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, Diagnostic &Diags) {
!Args.hasArg(OPT_no_code_completion_debug_printer);
Opts.DisableFree = Args.hasArg(OPT_disable_free);
- Opts.FixItLocations.clear();
- for (arg_iterator it = Args.filtered_begin(OPT_fixit_at),
- ie = Args.filtered_end(); it != ie; ++it) {
- const char *Loc = it->getValue(Args);
- ParsedSourceLocation PSL = ParsedSourceLocation::FromString(Loc);
-
- if (PSL.FileName.empty()) {
- Diags.Report(diag::err_drv_invalid_value) << it->getAsString(Args) << Loc;
- continue;
- }
-
- Opts.FixItLocations.push_back(PSL);
- }
-
Opts.OutputFile = getLastArgValue(Args, OPT_o);
Opts.Plugins = getAllArgValues(Args, OPT_load);
Opts.RelocatablePCH = Args.hasArg(OPT_relocatable_pch);