[PATCH] D151609: [Driver] Remove unused class ForceSuccessCommand
This revision was automatically updated to reflect the committed changes. Closed by commit rG692f3059fb95: [Driver] Remove unused class ForceSuccessCommand (authored by kazu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151609/new/ https://reviews.llvm.org/D151609 Files: clang/include/clang/Driver/Job.h clang/lib/Driver/Job.cpp Index: clang/lib/Driver/Job.cpp === --- clang/lib/Driver/Job.cpp +++ clang/lib/Driver/Job.cpp @@ -449,30 +449,6 @@ "The CC1Command doesn't support changing the environment vars!"); } -ForceSuccessCommand::ForceSuccessCommand( -const Action _, const Tool _, -ResponseFileSupport ResponseSupport, const char *Executable_, -const llvm::opt::ArgStringList _, ArrayRef Inputs, -ArrayRef Outputs) -: Command(Source_, Creator_, ResponseSupport, Executable_, Arguments_, - Inputs, Outputs) {} - -void ForceSuccessCommand::Print(raw_ostream , 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 , const char *Terminator, bool Quote, CrashReportInfo *CrashInfo) const { for (const auto : *this) Index: clang/include/clang/Driver/Job.h === --- clang/include/clang/Driver/Job.h +++ clang/include/clang/Driver/Job.h @@ -258,23 +258,6 @@ void setEnvironment(llvm::ArrayRef NewEnvironment) override; }; -/// Like Command, but always pretends that the wrapped command succeeded. -class ForceSuccessCommand : public Command { -public: - ForceSuccessCommand(const Action _, const Tool _, - ResponseFileSupport ResponseSupport, - const char *Executable_, - const llvm::opt::ArgStringList _, - ArrayRef Inputs, - ArrayRef Outputs = std::nullopt); - - void Print(llvm::raw_ostream , 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: Index: clang/lib/Driver/Job.cpp === --- clang/lib/Driver/Job.cpp +++ clang/lib/Driver/Job.cpp @@ -449,30 +449,6 @@ "The CC1Command doesn't support changing the environment vars!"); } -ForceSuccessCommand::ForceSuccessCommand( -const Action _, const Tool _, -ResponseFileSupport ResponseSupport, const char *Executable_, -const llvm::opt::ArgStringList _, ArrayRef Inputs, -ArrayRef Outputs) -: Command(Source_, Creator_, ResponseSupport, Executable_, Arguments_, - Inputs, Outputs) {} - -void ForceSuccessCommand::Print(raw_ostream , 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 , const char *Terminator, bool Quote, CrashReportInfo *CrashInfo) const { for (const auto : *this) Index: clang/include/clang/Driver/Job.h === --- clang/include/clang/Driver/Job.h +++ clang/include/clang/Driver/Job.h @@ -258,23 +258,6 @@ void setEnvironment(llvm::ArrayRef NewEnvironment) override; }; -/// Like Command, but always pretends that the wrapped command succeeded. -class ForceSuccessCommand : public Command { -public: - ForceSuccessCommand(const Action _, const Tool _, - ResponseFileSupport ResponseSupport, - const char *Executable_, - const llvm::opt::ArgStringList _, - ArrayRef Inputs, - ArrayRef Outputs = std::nullopt); - - void Print(llvm::raw_ostream , const char *Terminator, bool Quote, - CrashReportInfo *CrashInfo = nullptr) const override; - - int Execute(ArrayRef> Redirects, std::string
[PATCH] D151609: [Driver] Remove unused class ForceSuccessCommand
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. lgtm, thanks! (clicky: https://reviews.llvm.org/rG6625680a581c5e29c53d9f58d864cc6cd3cd05f6) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151609/new/ https://reviews.llvm.org/D151609 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D151609: [Driver] Remove unused class ForceSuccessCommand
kazu created this revision. Herald added a project: All. kazu requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. The last use was removed by: commit 6625680a581c5e29c53d9f58d864cc6cd3cd05f6 Author: Hans Wennborg Date: Tue Feb 2 14:10:26 2021 +0100 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D151609 Files: clang/include/clang/Driver/Job.h clang/lib/Driver/Job.cpp Index: clang/lib/Driver/Job.cpp === --- clang/lib/Driver/Job.cpp +++ clang/lib/Driver/Job.cpp @@ -449,30 +449,6 @@ "The CC1Command doesn't support changing the environment vars!"); } -ForceSuccessCommand::ForceSuccessCommand( -const Action _, const Tool _, -ResponseFileSupport ResponseSupport, const char *Executable_, -const llvm::opt::ArgStringList _, ArrayRef Inputs, -ArrayRef Outputs) -: Command(Source_, Creator_, ResponseSupport, Executable_, Arguments_, - Inputs, Outputs) {} - -void ForceSuccessCommand::Print(raw_ostream , 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 , const char *Terminator, bool Quote, CrashReportInfo *CrashInfo) const { for (const auto : *this) Index: clang/include/clang/Driver/Job.h === --- clang/include/clang/Driver/Job.h +++ clang/include/clang/Driver/Job.h @@ -258,23 +258,6 @@ void setEnvironment(llvm::ArrayRef NewEnvironment) override; }; -/// Like Command, but always pretends that the wrapped command succeeded. -class ForceSuccessCommand : public Command { -public: - ForceSuccessCommand(const Action _, const Tool _, - ResponseFileSupport ResponseSupport, - const char *Executable_, - const llvm::opt::ArgStringList _, - ArrayRef Inputs, - ArrayRef Outputs = std::nullopt); - - void Print(llvm::raw_ostream , 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: Index: clang/lib/Driver/Job.cpp === --- clang/lib/Driver/Job.cpp +++ clang/lib/Driver/Job.cpp @@ -449,30 +449,6 @@ "The CC1Command doesn't support changing the environment vars!"); } -ForceSuccessCommand::ForceSuccessCommand( -const Action _, const Tool _, -ResponseFileSupport ResponseSupport, const char *Executable_, -const llvm::opt::ArgStringList _, ArrayRef Inputs, -ArrayRef Outputs) -: Command(Source_, Creator_, ResponseSupport, Executable_, Arguments_, - Inputs, Outputs) {} - -void ForceSuccessCommand::Print(raw_ostream , 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 , const char *Terminator, bool Quote, CrashReportInfo *CrashInfo) const { for (const auto : *this) Index: clang/include/clang/Driver/Job.h === --- clang/include/clang/Driver/Job.h +++ clang/include/clang/Driver/Job.h @@ -258,23 +258,6 @@ void setEnvironment(llvm::ArrayRef NewEnvironment) override; }; -/// Like Command, but always pretends that the wrapped command succeeded. -class ForceSuccessCommand : public Command { -public: - ForceSuccessCommand(const Action _, const Tool _, - ResponseFileSupport ResponseSupport, - const char *Executable_, - const llvm::opt::ArgStringList _, - ArrayRef Inputs, - ArrayRef Outputs = std::nullopt); - - void Print(llvm::raw_ostream , const char *Terminator, bool Quote, - CrashReportInfo *CrashInfo =