summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReader.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-08-12 05:59:41 +0000
committerDouglas Gregor <dgregor@apple.com>2011-08-12 05:59:41 +0000
commit0a58618a0909775658e4fe3966c0d27d89153feb (patch)
tree3ae8a36a162886d06887d4f26f06a1e48c0aa8cc /clang/lib/Serialization/ASTReader.cpp
parent9f8a02d34e0e52e953a1f8fff45aba306784c4ed (diff)
downloadbcm5719-llvm-0a58618a0909775658e4fe3966c0d27d89153feb.tar.gz
bcm5719-llvm-0a58618a0909775658e4fe3966c0d27d89153feb.zip
Switch the Objective-C 'Class' type over to a predefined type in the
AST file format, lazily generating the actual declaration in ASTContext as needed. llvm-svn: 137431
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
-rw-r--r--clang/lib/Serialization/ASTReader.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 2e9e1bee684..2d4cde05a9d 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -2997,11 +2997,6 @@ void ASTReader::InitializeContext(ASTContext &Ctx) {
Context->ObjCProtoType = GetType(Proto);
}
- if (unsigned Class = SpecialTypes[SPECIAL_TYPE_OBJC_CLASS]) {
- if (Context->ObjCClassTypedefType.isNull())
- Context->ObjCClassTypedefType = GetType(Class);
- }
-
if (unsigned String = SpecialTypes[SPECIAL_TYPE_CF_CONSTANT_STRING]) {
if (!Context->CFConstantStringTypeDecl)
Context->setCFConstantStringType(GetType(String));
@@ -4224,6 +4219,10 @@ Decl *ASTReader::GetDecl(DeclID ID) {
case PREDEF_DECL_OBJC_ID_ID:
assert(Context && "No context available?");
return Context->getObjCIdDecl();
+
+ case PREDEF_DECL_OBJC_CLASS_ID:
+ assert(Context && "No context available?");
+ return Context->getObjCClassDecl();
}
return 0;
OpenPOWER on IntegriCloud