aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/ASTConsumer.cpp6
-rw-r--r--lib/Sema/ParseAST.cpp2
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/AST/ASTConsumer.cpp b/lib/AST/ASTConsumer.cpp
index b3d1271092..3f92990f36 100644
--- a/lib/AST/ASTConsumer.cpp
+++ b/lib/AST/ASTConsumer.cpp
@@ -13,6 +13,8 @@
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/Decl.h"
+#include "clang/AST/TranslationUnit.h"
+
using namespace clang;
ASTConsumer::~ASTConsumer() {}
@@ -26,3 +28,7 @@ void ASTConsumer::HandleTopLevelDeclaration(Decl* d) {
else
HandleTopLevelDecl(d);
}
+
+void ASTConsumer::InitializeTU(TranslationUnit& TU) {
+ Initialize(TU.getContext());
+}
diff --git a/lib/Sema/ParseAST.cpp b/lib/Sema/ParseAST.cpp
index cff3ef7612..9199179af7 100644
--- a/lib/Sema/ParseAST.cpp
+++ b/lib/Sema/ParseAST.cpp
@@ -46,7 +46,7 @@ void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer, bool PrintStats) {
// Initialize the parser.
P.Initialize();
- Consumer->Initialize(Context);
+ Consumer->InitializeTU(TU);
Parser::DeclTy *ADecl;