diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2008-12-07 16:41:11 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2008-12-07 16:41:11 +0000 |
commit | f915253dfcfbe772ee04872544a4f012c6f851be (patch) | |
tree | 37804c93f492340cbffe03d4f709e34d9e1d99e2 /include/llvm/CompilerDriver/Tool.h | |
parent | 6290f5cac23399201f8785e5ca8b305e42a1342c (diff) |
Use (actions) instead of option properties, support external options.
Also includes a major refactoring. See documentation for more
information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CompilerDriver/Tool.h')
-rw-r--r-- | include/llvm/CompilerDriver/Tool.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/include/llvm/CompilerDriver/Tool.h b/include/llvm/CompilerDriver/Tool.h index c422a43992..8e8f6e73c2 100644 --- a/include/llvm/CompilerDriver/Tool.h +++ b/include/llvm/CompilerDriver/Tool.h @@ -36,22 +36,29 @@ namespace llvmc { virtual ~Tool() {} virtual Action GenerateAction (const PathVector& inFiles, - const llvm::sys::Path& outFile, + bool HasChildren, + const llvm::sys::Path& TempDir, const InputLanguagesSet& InLangs, const LanguageMap& LangMap) const = 0; virtual Action GenerateAction (const llvm::sys::Path& inFile, - const llvm::sys::Path& outFile, + 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; virtual const char* OutputLanguage() const = 0; - virtual const char* OutputSuffix() const = 0; - virtual bool IsLast() const = 0; virtual bool IsJoin() const = 0; + + protected: + /// OutFileName - Generate the output file name. + llvm::sys::Path OutFilename(const llvm::sys::Path& In, + const llvm::sys::Path& TempDir, + bool StopCompilation, + const char* OutputSuffix) const; }; /// JoinTool - A Tool that has an associated input file list. @@ -61,10 +68,11 @@ namespace llvmc { void ClearJoinList() { JoinList_.clear(); } bool JoinListEmpty() const { return JoinList_.empty(); } - Action GenerateAction(const llvm::sys::Path& outFile, + Action GenerateAction(bool HasChildren, + const llvm::sys::Path& TempDir, const InputLanguagesSet& InLangs, const LanguageMap& LangMap) const { - return GenerateAction(JoinList_, outFile, InLangs, LangMap); + return GenerateAction(JoinList_, HasChildren, TempDir, InLangs, LangMap); } // We shouldn't shadow base class's version of GenerateAction. using Tool::GenerateAction; |