aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-09-01 00:58:55 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-09-01 00:58:55 +0000
commite6b8d68a927368b06ac06cc9ac9e7f60aa966d5f (patch)
treeed379340bfd735af63c521a8b6439104799f434a /lib/AST/DeclObjC.cpp
parent50c909bd837f00265034d876736e2db47686be38 (diff)
Support importing of ObjC categories from modules.
The initial incentive was to fix a crash when PCH chaining categories to an interface, but the fix was done in the "modules way" that I hear is popular with the kids these days. Each module stores the local chain of categories and we combine them when the interface is loaded. We also warn if non-dependent modules introduce duplicate named categories. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138926 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r--lib/AST/DeclObjC.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index ad2fd289a7..45e34811ea 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -14,6 +14,7 @@
#include "clang/AST/DeclObjC.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Stmt.h"
+#include "clang/AST/ASTMutationListener.h"
#include "llvm/ADT/STLExtras.h"
using namespace clang;
@@ -918,7 +919,8 @@ ObjCCategoryDecl *ObjCCategoryDecl::Create(ASTContext &C, DeclContext *DC,
// Link this category into its class's category list.
CatDecl->NextClassCategory = IDecl->getCategoryList();
IDecl->setCategoryList(CatDecl);
- IDecl->setChangedSinceDeserialization(true);
+ if (ASTMutationListener *L = C.getASTMutationListener())
+ L->AddedObjCCategoryToInterface(CatDecl, IDecl);
}
return CatDecl;