diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-10-24 17:26:36 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-10-24 17:26:36 +0000 |
commit | 65ad5691fd48b2ad6982adb5f416ccc2a41fc8da (patch) | |
tree | 44234e8b6b6b87c006d9f23587074aad6c05905e /clang/lib/Frontend/FrontendAction.cpp | |
parent | ad5f95cc4bcaf97debcd1cfd85d1110bfe3af4d3 (diff) | |
download | bcm5719-llvm-65ad5691fd48b2ad6982adb5f416ccc2a41fc8da.tar.gz bcm5719-llvm-65ad5691fd48b2ad6982adb5f416ccc2a41fc8da.zip |
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
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendAction.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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<ASTConsumer> 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!"); |