aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Basic/DiagnosticDriverKinds.td4
-rw-r--r--include/clang/Driver/Action.h2
-rw-r--r--include/clang/Driver/Compilation.h16
3 files changed, 16 insertions, 6 deletions
diff --git a/include/clang/Basic/DiagnosticDriverKinds.td b/include/clang/Basic/DiagnosticDriverKinds.td
index 327db00e0b..a8dbd68df1 100644
--- a/include/clang/Basic/DiagnosticDriverKinds.td
+++ b/include/clang/Basic/DiagnosticDriverKinds.td
@@ -45,6 +45,10 @@ def err_drv_no_linker_llvm_support : Error<
"'%0': unable to pass LLVM bit-code files to linker">;
def err_drv_clang_unsupported : Error<
"the clang compiler does not support '%0'">;
+def err_drv_command_failed : Error<
+ "%0 command failed with exit code %1 (use -v to see invocation)">;
+def err_drv_command_signalled : Error<
+ "%0 command failed due to signal %1 (use -v to see invocation)">;
def warn_drv_input_file_unused : Warning<
"%0: '%1' input unused when '%2' is present">;
diff --git a/include/clang/Driver/Action.h b/include/clang/Driver/Action.h
index b9bf671db2..ceef189f7b 100644
--- a/include/clang/Driver/Action.h
+++ b/include/clang/Driver/Action.h
@@ -75,6 +75,8 @@ protected:
public:
virtual ~Action();
+ const char *getClassName() const { return Action::getClassName(getKind()); }
+
ActionClass getKind() const { return Kind; }
types::ID getType() const { return Type; }
diff --git a/include/clang/Driver/Compilation.h b/include/clang/Driver/Compilation.h
index 4985f30ad5..0e66796a6e 100644
--- a/include/clang/Driver/Compilation.h
+++ b/include/clang/Driver/Compilation.h
@@ -103,22 +103,26 @@ private:
/// PrintJob - Print one job in -### format.
///
- /// OS - The stream to print on.
- /// J - The job to print.
- /// Terminator - A string to print at the end of the line.
- /// Quote - Should separate arguments be quoted.
+ /// \param OS - The stream to print on.
+ /// \param J - The job to print.
+ /// \param Terminator - A string to print at the end of the line.
+ /// \param Quote - Should separate arguments be quoted.
void PrintJob(llvm::raw_ostream &OS, const Job &J,
const char *Terminator, bool Quote) const;
/// ExecuteCommand - Execute an actual command.
///
+ /// \param FailingCommand - For non-zero results, this will be set to the
+ /// Command which failed, if any.
/// \return The result code of the subprocess.
- int ExecuteCommand(const Command &C) const;
+ int ExecuteCommand(const Command &C, const Command *&FailingCommand) const;
/// ExecuteJob - Execute a single job.
///
+ /// \param FailingCommand - For non-zero results, this will be set to the
+ /// Command which failed, if any.
/// \return The accumulated result code of the job.
- int ExecuteJob(const Job &J) const;
+ int ExecuteJob(const Job &J, const Command *&FailingCommand) const;
};
} // end namespace driver