1 //===-- FrontendActions.h - Useful Frontend Actions -------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_CLANG_REWRITE_FRONTENDACTIONS_H
11 #define LLVM_CLANG_REWRITE_FRONTENDACTIONS_H
13 #include "clang/Frontend/FrontendAction.h"
19 //===----------------------------------------------------------------------===//
20 // AST Consumer Actions
21 //===----------------------------------------------------------------------===//
23 class HTMLPrintAction : public ASTFrontendAction {
25 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
29 class FixItAction : public ASTFrontendAction {
31 OwningPtr<FixItRewriter> Rewriter;
32 OwningPtr<FixItOptions> FixItOpts;
34 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
37 virtual bool BeginSourceFileAction(CompilerInstance &CI,
40 virtual void EndSourceFileAction();
42 virtual bool hasASTFileSupport() const { return false; }
49 /// \brief Emits changes to temporary files and uses them for the original
51 class FixItRecompile : public WrapperFrontendAction {
53 FixItRecompile(FrontendAction *WrappedAction)
54 : WrapperFrontendAction(WrappedAction) {}
57 virtual bool BeginInvocation(CompilerInstance &CI);
60 class RewriteObjCAction : public ASTFrontendAction {
62 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
66 class RewriteMacrosAction : public PreprocessorFrontendAction {
71 class RewriteTestAction : public PreprocessorFrontendAction {
76 class RewriteIncludesAction : public PreprocessorFrontendAction {
81 } // end namespace clang