Move the creation of the predefined typedef for Objective-C's 'id'
type over into the AST context, then make that declaration a
predefined declaration in the AST format. This ensures that different
AST files will at least agree on the (global) declaration ID for 'id',
and eliminates one of the "special" types in the AST file format.

llvm-svn: 137429
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 43435b6..2e9e1be 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -2987,11 +2987,6 @@
       GetType(SpecialTypes[SPECIAL_TYPE_BUILTIN_VA_LIST]));
   }
   
-  if (unsigned Id = SpecialTypes[SPECIAL_TYPE_OBJC_ID]) {
-    if (Context->ObjCIdTypedefType.isNull())
-      Context->ObjCIdTypedefType = GetType(Id);
-  }
-  
   if (unsigned Sel = SpecialTypes[SPECIAL_TYPE_OBJC_SELECTOR]) {
     if (Context->ObjCSelTypedefType.isNull())
       Context->ObjCSelTypedefType = GetType(Sel);
@@ -4225,6 +4220,10 @@
     case PREDEF_DECL_TRANSLATION_UNIT_ID:
       assert(Context && "No context available?");
       return Context->getTranslationUnitDecl();
+        
+    case PREDEF_DECL_OBJC_ID_ID:
+      assert(Context && "No context available?");
+      return Context->getObjCIdDecl();
     }
     
     return 0;