diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-06-16 16:59:23 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-06-16 16:59:23 +0000 |
commit | 3177aae51a21f61ab483c52f97124bdb707da7f1 (patch) | |
tree | c0dcd4ec9cd85fe30d7f3f2a55386f8aa0a4686d /include/clang/Frontend/FrontendAction.h | |
parent | 7ccecb72cb8e0a77139526bd090cf8c68ba178cd (diff) |
Frontend: Allow passing -cc1 level arguments to plugins. Patch by Troy Straszheim!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/FrontendAction.h')
-rw-r--r-- | include/clang/Frontend/FrontendAction.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/clang/Frontend/FrontendAction.h b/include/clang/Frontend/FrontendAction.h index b16a6aa509..f6a68bf69e 100644 --- a/include/clang/Frontend/FrontendAction.h +++ b/include/clang/Frontend/FrontendAction.h @@ -13,6 +13,11 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/OwningPtr.h" #include <string> +#include <vector> + +namespace llvm { + class raw_ostream; +} namespace clang { class ASTConsumer; @@ -214,6 +219,16 @@ public: virtual bool usesPreprocessorOnly() const { return false; } }; +class PluginASTAction : public ASTFrontendAction { +protected: + virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI, + llvm::StringRef InFile) = 0; + +public: + virtual bool ParseArgs(const std::vector<std::string>& arg) = 0; + virtual void PrintHelp(llvm::raw_ostream&) = 0; +}; + /// PreprocessorFrontendAction - Abstract base class to use for preprocessor /// based frontend actions. class PreprocessorFrontendAction : public FrontendAction { |