diff --git a/clang/include/clang/Driver/Job.h b/clang/include/clang/Driver/Job.h index e866679dc1a91..df9449463c53b 100644 --- a/clang/include/clang/Driver/Job.h +++ b/clang/include/clang/Driver/Job.h @@ -258,23 +258,6 @@ class CC1Command : public Command { void setEnvironment(llvm::ArrayRef NewEnvironment) override; }; -/// Like Command, but always pretends that the wrapped command succeeded. -class ForceSuccessCommand : public Command { -public: - ForceSuccessCommand(const Action &Source_, const Tool &Creator_, - ResponseFileSupport ResponseSupport, - const char *Executable_, - const llvm::opt::ArgStringList &Arguments_, - ArrayRef Inputs, - ArrayRef Outputs = std::nullopt); - - void Print(llvm::raw_ostream &OS, const char *Terminator, bool Quote, - CrashReportInfo *CrashInfo = nullptr) const override; - - int Execute(ArrayRef> Redirects, std::string *ErrMsg, - bool *ExecutionFailed) const override; -}; - /// JobList - A sequence of jobs to perform. class JobList { public: diff --git a/clang/lib/Driver/Job.cpp b/clang/lib/Driver/Job.cpp index f85f55cd1ff54..573e91856d776 100644 --- a/clang/lib/Driver/Job.cpp +++ b/clang/lib/Driver/Job.cpp @@ -449,30 +449,6 @@ void CC1Command::setEnvironment(llvm::ArrayRef NewEnvironment) { "The CC1Command doesn't support changing the environment vars!"); } -ForceSuccessCommand::ForceSuccessCommand( - const Action &Source_, const Tool &Creator_, - ResponseFileSupport ResponseSupport, const char *Executable_, - const llvm::opt::ArgStringList &Arguments_, ArrayRef Inputs, - ArrayRef Outputs) - : Command(Source_, Creator_, ResponseSupport, Executable_, Arguments_, - Inputs, Outputs) {} - -void ForceSuccessCommand::Print(raw_ostream &OS, const char *Terminator, - bool Quote, CrashReportInfo *CrashInfo) const { - Command::Print(OS, "", Quote, CrashInfo); - OS << " || (exit 0)" << Terminator; -} - -int ForceSuccessCommand::Execute(ArrayRef> Redirects, - std::string *ErrMsg, - bool *ExecutionFailed) const { - int Status = Command::Execute(Redirects, ErrMsg, ExecutionFailed); - (void)Status; - if (ExecutionFailed) - *ExecutionFailed = false; - return 0; -} - void JobList::Print(raw_ostream &OS, const char *Terminator, bool Quote, CrashReportInfo *CrashInfo) const { for (const auto &Job : *this)