clang API Documentation
Frontend action adaptor that merges ASTs together. More...
#include <FrontendActions.h>


Public Member Functions | |
| ASTMergeAction (FrontendAction *AdaptedAction, ArrayRef< std::string > ASTFiles) | |
| virtual | ~ASTMergeAction () |
| virtual bool | usesPreprocessorOnly () const |
| virtual TranslationUnitKind | getTranslationUnitKind () |
| For AST-based actions, the kind of translation unit we're handling. | |
| virtual bool | hasPCHSupport () const |
| hasPCHSupport - Does this action support use with PCH? | |
| virtual bool | hasASTFileSupport () const |
| hasASTFileSupport - Does this action support use with AST files? | |
| virtual bool | hasCodeCompletionSupport () const |
Protected Member Functions | |
| virtual ASTConsumer * | CreateASTConsumer (CompilerInstance &CI, StringRef InFile) |
| virtual bool | BeginSourceFileAction (CompilerInstance &CI, StringRef Filename) |
| virtual void | ExecuteAction () |
| virtual void | EndSourceFileAction () |
Frontend action adaptor that merges ASTs together.
This action takes an existing AST file and "merges" it into the AST context, producing a merged context. This action is an action adaptor, which forwards most of its calls to another action that will consume the merged context.
Definition at line 138 of file Frontend/FrontendActions.h.
| ASTMergeAction::ASTMergeAction | ( | FrontendAction * | AdaptedAction, |
| ArrayRef< std::string > | ASTFiles | ||
| ) |
Definition at line 81 of file ASTMerge.cpp.
| ASTMergeAction::~ASTMergeAction | ( | ) | [virtual] |
Definition at line 87 of file ASTMerge.cpp.
| bool ASTMergeAction::BeginSourceFileAction | ( | CompilerInstance & | CI, |
| StringRef | Filename | ||
| ) | [protected, virtual] |
BeginSourceFileAction - Callback at the start of processing a single input.
Reimplemented from clang::FrontendAction.
Definition at line 24 of file ASTMerge.cpp.
References clang::FrontendAction::BeginSourceFileAction(), clang::FrontendAction::getCurrentInput(), clang::FrontendAction::setCompilerInstance(), clang::FrontendAction::setCurrentInput(), and clang::FrontendAction::takeCurrentASTUnit().
| ASTConsumer * ASTMergeAction::CreateASTConsumer | ( | CompilerInstance & | CI, |
| StringRef | InFile | ||
| ) | [protected, virtual] |
CreateASTConsumer - Create the AST consumer object for this action, if supported.
This routine is called as part of
| CI | - The current compiler instance, provided as a convenience, |
| InFile | - The current input file, provided as a convenience, |
Implements clang::FrontendAction.
Definition at line 19 of file ASTMerge.cpp.
References clang::FrontendAction::CreateASTConsumer().
| void ASTMergeAction::EndSourceFileAction | ( | ) | [protected, virtual] |
EndSourceFileAction - Callback at the end of processing a single input; this is guaranteed to only be called following a successful call to BeginSourceFileAction (and BeginSourceFile).
Reimplemented from clang::FrontendAction.
Definition at line 77 of file ASTMerge.cpp.
References clang::FrontendAction::EndSourceFileAction().
| void ASTMergeAction::ExecuteAction | ( | ) | [protected, virtual] |
ExecuteAction - Callback to run the program action, using the initialized compiler instance.
This routine is guaranteed to only be called between
Implements clang::FrontendAction.
Definition at line 34 of file ASTMerge.cpp.
References clang::DiagnosticConsumer::BeginSourceFile(), clang::DiagnosticConsumer::EndSourceFile(), clang::FrontendAction::ExecuteAction(), clang::FormatASTNodeDiagnosticArgument(), clang::CompilerInstance::getASTContext(), clang::ASTUnit::getASTContext(), clang::DiagnosticsEngine::getClient(), clang::FrontendAction::getCompilerInstance(), clang::DiagnosticsEngine::getDiagnosticIDs(), clang::CompilerInstance::getDiagnostics(), clang::CompilerInstance::getFileManager(), clang::ASTUnit::getFileManager(), clang::CompilerInstance::getFileSystemOpts(), clang::ASTContext::getLangOpts(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTUnit::LoadFromASTFile(), and clang::DiagnosticsEngine::SetArgToStringFn().
| TranslationUnitKind ASTMergeAction::getTranslationUnitKind | ( | ) | [virtual] |
For AST-based actions, the kind of translation unit we're handling.
Reimplemented from clang::FrontendAction.
Definition at line 95 of file ASTMerge.cpp.
References clang::FrontendAction::getTranslationUnitKind().
| bool ASTMergeAction::hasASTFileSupport | ( | ) | const [virtual] |
hasASTFileSupport - Does this action support use with AST files?
Reimplemented from clang::FrontendAction.
Definition at line 103 of file ASTMerge.cpp.
References clang::FrontendAction::hasASTFileSupport().
| bool ASTMergeAction::hasCodeCompletionSupport | ( | ) | const [virtual] |
hasCodeCompletionSupport - Does this action support use with code completion?
Reimplemented from clang::FrontendAction.
Definition at line 107 of file ASTMerge.cpp.
References clang::FrontendAction::hasCodeCompletionSupport().
| bool ASTMergeAction::hasPCHSupport | ( | ) | const [virtual] |
hasPCHSupport - Does this action support use with PCH?
Reimplemented from clang::FrontendAction.
Definition at line 99 of file ASTMerge.cpp.
References clang::FrontendAction::hasPCHSupport().
| bool ASTMergeAction::usesPreprocessorOnly | ( | ) | const [virtual] |
usesPreprocessorOnly - Does this action only use the preprocessor? If so no AST context will be created and this action will be invalid with AST file inputs.
Implements clang::FrontendAction.
Definition at line 91 of file ASTMerge.cpp.
References clang::FrontendAction::usesPreprocessorOnly().