aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/FrontendAction.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-06-18 00:53:41 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-06-18 00:53:41 +0000
commite665d6929e11796620ff799bc0186ebd747bfc76 (patch)
tree674045cb6c17c790f19a161135db2d3c77e12a51 /include/clang/Frontend/FrontendAction.h
parent60a5e3f90031191f18128eab8326eea70b266b27 (diff)
[arcmt] Fix the ARC migrator. -arcmt-modify requires running before the initialization of SourceManager
because it is going to modify the input file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/FrontendAction.h')
-rw-r--r--include/clang/Frontend/FrontendAction.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/clang/Frontend/FrontendAction.h b/include/clang/Frontend/FrontendAction.h
index 2538f55aaf..f335475665 100644
--- a/include/clang/Frontend/FrontendAction.h
+++ b/include/clang/Frontend/FrontendAction.h
@@ -78,6 +78,14 @@ protected:
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
llvm::StringRef InFile) = 0;
+ /// \brief Callback before starting processing a single input, giving the
+ /// opportunity to modify the CompilerInvocation or do some other action
+ /// before BeginSourceFileAction is called.
+ ///
+ /// \return True on success; on failure \see BeginSourceFileAction() and
+ /// ExecutionAction() and EndSourceFileAction() will not be called.
+ virtual bool BeginInvocation(CompilerInstance &CI) { return true; }
+
/// BeginSourceFileAction - Callback at the start of processing a single
/// input.
///
@@ -265,6 +273,7 @@ class WrapperFrontendAction : public FrontendAction {
protected:
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
llvm::StringRef InFile);
+ virtual bool BeginInvocation(CompilerInstance &CI);
virtual bool BeginSourceFileAction(CompilerInstance &CI,
llvm::StringRef Filename);
virtual void ExecuteAction();