From 65ad5691fd48b2ad6982adb5f416ccc2a41fc8da Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Sun, 24 Oct 2010 17:26:36 +0000 Subject: Put the mechanism in place to track modifications in an AST entity that were committed after its initial creation/deserialization and store the changes in a chained PCH. The idea is that the AST entities call methods on the ASTMutationListener to give notifications of changes; the PCHWriter implements the ASTMutationListener interface and stores the incremental changes of the updated entity. WIP llvm-svn: 117235 --- clang/lib/Frontend/FrontendAction.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/Frontend/FrontendAction.cpp') diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index 97188919f9a..26ae4b1f7f8 100644 --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -167,6 +167,8 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, llvm::OwningPtr Consumer(CreateASTConsumer(CI, Filename)); + CI.getASTContext().setASTMutationListener(Consumer->GetASTMutationListener()); + /// Use PCH? if (!CI.getPreprocessorOpts().ImplicitPCHInclude.empty()) { assert(hasPCHSupport() && "This action does not have PCH support!"); -- cgit v1.2.3