[driver] Separate "delegate to the migrator with swift-update" and "get compiler fixits with swift-fixit" functionalities.

Swift SVN r27139
This commit is contained in:
Argyrios Kyrtzidis
2015-04-08 22:02:23 +00:00
parent bd14e0cc4c
commit 623b9827b4
11 changed files with 29 additions and 13 deletions

View File

@@ -156,6 +156,10 @@ Job *Swift::constructJob(const JobAction &JA, std::unique_ptr<JobList> Inputs,
SmallString<128> SwiftUpdatePath = llvm::sys::path::parent_path(Exec);
llvm::sys::path::append(SwiftUpdatePath, "swift-update");
Exec = Args.MakeArgString(SwiftUpdatePath.str());
} else if (OI.CompilerMode == OutputInfo::Mode::FixCode) {
SmallString<128> SwiftFixPath = llvm::sys::path::parent_path(Exec);
llvm::sys::path::append(SwiftFixPath, "swift-fixit");
Exec = Args.MakeArgString(SwiftFixPath.str());
} else {
// Invoke ourselves in -frontend mode.
Arguments.push_back("-frontend");