Initialize the AST consumer as soon as we have both an ASTConsumer and an

ASTContext. Fixes some cases where we could previously initialize the AST
consumer more than once.

llvm-svn: 245346
This commit is contained in:
Richard Smith
2015-08-18 20:39:29 +00:00
parent 35b0eaf23d
commit 293534b1a5
7 changed files with 23 additions and 24 deletions

View File

@@ -59,7 +59,6 @@ void ASTMergeAction::ExecuteAction() {
/*MinimalImport=*/false);
TranslationUnitDecl *TU = Unit->getASTContext().getTranslationUnitDecl();
CI.getASTConsumer().Initialize(CI.getASTContext());
for (auto *D : TU->decls()) {
// Don't re-import __va_list_tag, __builtin_va_list.
if (const auto *ND = dyn_cast<NamedDecl>(D))