19std::unique_ptr<ASTConsumer>
21 return AdaptedAction->CreateASTConsumer(CI, InFile);
29 AdaptedAction->setCompilerInstance(&CI);
30 return AdaptedAction->BeginSourceFileAction(CI);
41 auto SharedState = std::make_shared<ASTImporterSharedState>(
43 for (
unsigned I = 0, N = ASTFiles.size(); I != N; ++I) {
57 Unit->getASTContext(), Unit->getFileManager(),
61 for (
auto *
D : TU->
decls()) {
63 if (
const auto *ND = dyn_cast<NamedDecl>(
D))
65 if (II->isStr(
"__va_list_tag") || II->isStr(
"__builtin_va_list"))
74 llvm::consumeError(ToDOrError.takeError());
79 AdaptedAction->ExecuteAction();
84 return AdaptedAction->EndSourceFileAction();
89: AdaptedAction(
std::move(adaptedAction)), ASTFiles(ASTFiles.begin(), ASTFiles.end()) {
90 assert(AdaptedAction &&
"ASTMergeAction needs an action to adapt");
97 return AdaptedAction->usesPreprocessorOnly();
101 return AdaptedAction->getTranslationUnitKind();
105 return AdaptedAction->hasPCHSupport();
109 return AdaptedAction->hasASTFileSupport();
113 return AdaptedAction->hasCodeCompletionSupport();
Defines the clang::ASTContext interface.
Defines the Diagnostic-related interfaces.
virtual bool HandleTopLevelDecl(DeclGroupRef D)
HandleTopLevelDecl - Handle the specified top-level declaration.
TranslationUnitDecl * getTranslationUnitDecl() const
const LangOptions & getLangOpts() const
Imports selected nodes from one AST context into another context, merging AST nodes where appropriate...
llvm::Expected< ExprWithCleanups::CleanupObject > Import(ExprWithCleanups::CleanupObject From)
Import cleanup objects owned by ExprWithCleanup.
Definition: