diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-10-24 17:26:50 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-10-24 17:26:50 +0000 |
| commit | d170d844c4b2ba3c1890113dbf61b6056ce4a577 (patch) | |
| tree | f96d257fd664cdb459ec9c02005654e2b56699dd /clang/lib/AST/Decl.cpp | |
| parent | 3ba70b89cf94c5090aae9962bf633de871c7d32d (diff) | |
| download | bcm5719-llvm-d170d844c4b2ba3c1890113dbf61b6056ce4a577.tar.gz bcm5719-llvm-d170d844c4b2ba3c1890113dbf61b6056ce4a577.zip | |
Start fleshing out ASTMutationListener; notify when a tag definition is completed.
In that case a chained PCH will record the updates to the DefinitionData pointer of forward references.
If a forward reference mutated into a definition re-write it into the chained PCH, this is too big of a change.
llvm-svn: 117239
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
| -rw-r--r-- | clang/lib/AST/Decl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index fc5b57f1485..42e762d56ab 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -21,6 +21,7 @@ #include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/PrettyPrinter.h" +#include "clang/AST/ASTMutationListener.h" #include "clang/Basic/Builtins.h" #include "clang/Basic/IdentifierTable.h" #include "clang/Basic/Specifiers.h" @@ -1713,6 +1714,9 @@ void TagDecl::completeDefinition() { IsDefinition = true; IsBeingDefined = false; + + if (ASTMutationListener *L = getASTMutationListener()) + L->CompletedTagDefinition(this); } TagDecl* TagDecl::getDefinition() const { |

