summaryrefslogtreecommitdiff
path: root/include/clang/Driver/Job.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Driver/Job.h')
-rw-r--r--include/clang/Driver/Job.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/include/clang/Driver/Job.h b/include/clang/Driver/Job.h
index 1dd49a792356..5b19efeddeea 100644
--- a/include/clang/Driver/Job.h
+++ b/include/clang/Driver/Job.h
@@ -11,9 +11,9 @@
#define CLANG_DRIVER_JOB_H_
#include "clang/Basic/LLVM.h"
-#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Option/Option.h"
+#include <memory>
namespace llvm {
class raw_ostream;
@@ -76,8 +76,8 @@ public:
Command(const Action &_Source, const Tool &_Creator, const char *_Executable,
const llvm::opt::ArgStringList &_Arguments);
- virtual void Print(llvm::raw_ostream &OS, const char *Terminator,
- bool Quote, bool CrashReport = false) const;
+ void Print(llvm::raw_ostream &OS, const char *Terminator, bool Quote,
+ bool CrashReport = false) const override;
virtual int Execute(const StringRef **Redirects, std::string *ErrMsg,
bool *ExecutionFailed) const;
@@ -88,6 +88,8 @@ public:
/// getCreator - Return the Tool which caused the creation of this job.
const Tool &getCreator() const { return Creator; }
+ const char *getExecutable() const { return Executable; }
+
const llvm::opt::ArgStringList &getArguments() const { return Arguments; }
static bool classof(const Job *J) {
@@ -104,18 +106,18 @@ public:
const char *Executable_, const ArgStringList &Arguments_,
Command *Fallback_);
- virtual void Print(llvm::raw_ostream &OS, const char *Terminator,
- bool Quote, bool CrashReport = false) const;
+ void Print(llvm::raw_ostream &OS, const char *Terminator, bool Quote,
+ bool CrashReport = false) const override;
- virtual int Execute(const StringRef **Redirects, std::string *ErrMsg,
- bool *ExecutionFailed) const;
+ int Execute(const StringRef **Redirects, std::string *ErrMsg,
+ bool *ExecutionFailed) const override;
static bool classof(const Job *J) {
return J->getKind() == FallbackCommandClass;
}
private:
- OwningPtr<Command> Fallback;
+ std::unique_ptr<Command> Fallback;
};
/// JobList - A sequence of jobs to perform.
@@ -133,8 +135,8 @@ public:
JobList();
virtual ~JobList();
- virtual void Print(llvm::raw_ostream &OS, const char *Terminator,
- bool Quote, bool CrashReport = false) const;
+ void Print(llvm::raw_ostream &OS, const char *Terminator,
+ bool Quote, bool CrashReport = false) const override;
/// Add a job to the list (taking ownership).
void addJob(Job *J) { Jobs.push_back(J); }