aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/FrontendActions.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-11-15 22:58:25 +0000
committerDouglas Gregor <dgregor@apple.com>2011-11-15 22:58:25 +0000
commitd2536a604f59a3cca491f175bf1e49eeca49163b (patch)
tree0030af96483fedda86d5fcdae114f4bddf75f6b0 /include/clang/Frontend/FrontendActions.h
parent3bc451593fa44bfc45753e44e37cb4242e714f82 (diff)
Revert r144703. It was a dumb idea anyway; will add the new bits more
incrementally with a new frontend action. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144723 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/FrontendActions.h')
-rw-r--r--include/clang/Frontend/FrontendActions.h28
1 files changed, 5 insertions, 23 deletions
diff --git a/include/clang/Frontend/FrontendActions.h b/include/clang/Frontend/FrontendActions.h
index ba1dbb8f23..72a3d90847 100644
--- a/include/clang/Frontend/FrontendActions.h
+++ b/include/clang/Frontend/FrontendActions.h
@@ -67,40 +67,22 @@ protected:
};
class GeneratePCHAction : public ASTFrontendAction {
+ bool MakeModule;
+
protected:
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
StringRef InFile);
virtual TranslationUnitKind getTranslationUnitKind() {
- return TU_Prefix;
+ return MakeModule? TU_Module : TU_Prefix;
}
virtual bool hasASTFileSupport() const { return false; }
public:
- /// \brief Compute the AST consumer arguments that will be used to
- /// create the PCHGenerator instance returned by CreateASTConsumer.
- ///
- /// \returns true if an error occurred, false otherwise.
- static bool ComputeASTConsumerArguments(CompilerInstance &CI,
- StringRef InFile,
- std::string &Sysroot,
- std::string &OutputFile,
- raw_ostream *&OS);
-};
-
-class GenerateModuleAction : public ASTFrontendAction {
-protected:
- virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- StringRef InFile);
-
- virtual TranslationUnitKind getTranslationUnitKind() {
- return TU_Module;
- }
+ /// \brief Create a new action
+ explicit GeneratePCHAction(bool MakeModule) : MakeModule(MakeModule) { }
- virtual bool hasASTFileSupport() const { return false; }
-
-public:
/// \brief Compute the AST consumer arguments that will be used to
/// create the PCHGenerator instance returned by CreateASTConsumer.
///