summaryrefslogtreecommitdiff
path: root/include/llvm/CompilerDriver/Tool.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CompilerDriver/Tool.h')
-rw-r--r--include/llvm/CompilerDriver/Tool.h40
1 files changed, 24 insertions, 16 deletions
diff --git a/include/llvm/CompilerDriver/Tool.h b/include/llvm/CompilerDriver/Tool.h
index 85d1690bcfed..45ef50d0b5af 100644
--- a/include/llvm/CompilerDriver/Tool.h
+++ b/include/llvm/CompilerDriver/Tool.h
@@ -38,17 +38,23 @@ namespace llvmc {
virtual ~Tool() {}
- virtual Action GenerateAction (const PathVector& inFiles,
- bool HasChildren,
- const llvm::sys::Path& TempDir,
- const InputLanguagesSet& InLangs,
- const LanguageMap& LangMap) const = 0;
-
- virtual Action GenerateAction (const llvm::sys::Path& inFile,
- bool HasChildren,
- const llvm::sys::Path& TempDir,
- const InputLanguagesSet& InLangs,
- const LanguageMap& LangMap) const = 0;
+ /// GenerateAction - Generate an Action given particular command-line
+ /// options. Returns non-zero value on error.
+ virtual int GenerateAction (Action& Out,
+ const PathVector& inFiles,
+ const bool HasChildren,
+ const llvm::sys::Path& TempDir,
+ const InputLanguagesSet& InLangs,
+ const LanguageMap& LangMap) const = 0;
+
+ /// GenerateAction - Generate an Action given particular command-line
+ /// options. Returns non-zero value on error.
+ virtual int GenerateAction (Action& Out,
+ const llvm::sys::Path& inFile,
+ const bool HasChildren,
+ const llvm::sys::Path& TempDir,
+ const InputLanguagesSet& InLangs,
+ const LanguageMap& LangMap) const = 0;
virtual const char* Name() const = 0;
virtual const char** InputLanguages() const = 0;
@@ -74,11 +80,13 @@ namespace llvmc {
void ClearJoinList() { JoinList_.clear(); }
bool JoinListEmpty() const { return JoinList_.empty(); }
- Action GenerateAction(bool HasChildren,
- const llvm::sys::Path& TempDir,
- const InputLanguagesSet& InLangs,
- const LanguageMap& LangMap) const {
- return GenerateAction(JoinList_, HasChildren, TempDir, InLangs, LangMap);
+ int GenerateAction(Action& Out,
+ const bool HasChildren,
+ const llvm::sys::Path& TempDir,
+ const InputLanguagesSet& InLangs,
+ const LanguageMap& LangMap) const {
+ return GenerateAction(Out, JoinList_, HasChildren, TempDir, InLangs,
+ LangMap);
}
// We shouldn't shadow base class's version of GenerateAction.
using Tool::GenerateAction;