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
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 2e9e1be..2d4cde0 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -2997,11 +2997,6 @@
       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 @@
     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;