diff options
Diffstat (limited to 'lib/Sema/ParseAST.cpp')
-rw-r--r-- | lib/Sema/ParseAST.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/ParseAST.cpp b/lib/Sema/ParseAST.cpp index 4bcb478e89..bb5acb0ee8 100644 --- a/lib/Sema/ParseAST.cpp +++ b/lib/Sema/ParseAST.cpp @@ -14,6 +14,7 @@ #include <llvm/ADT/OwningPtr.h> #include "clang/Sema/ParseAST.h" #include "clang/AST/ASTConsumer.h" +#include "clang/AST/ExternalASTSource.h" #include "clang/AST/Stmt.h" #include "Sema.h" #include "clang/Parse/Parser.h" @@ -44,6 +45,9 @@ void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer, Consumer->Initialize(Ctx); + if (Ctx.getExternalSource()) + Ctx.getExternalSource()->StartTranslationUnit(Consumer); + Parser::DeclGroupPtrTy ADecl; while (!P.ParseTopLevelDecl(ADecl)) { // Not end of file. |