aboutsummaryrefslogtreecommitdiff
path: root/lib/Serialization
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Serialization')
-rw-r--r--lib/Serialization/ASTReader.cpp9
-rw-r--r--lib/Serialization/ASTWriter.cpp5
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp
index 43435b6754..2e9e1bee68 100644
--- a/lib/Serialization/ASTReader.cpp
+++ b/lib/Serialization/ASTReader.cpp
@@ -2987,11 +2987,6 @@ void ASTReader::InitializeContext(ASTContext &Ctx) {
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 @@ Decl *ASTReader::GetDecl(DeclID ID) {
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;
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp
index 2654ae3fdf..2377369c74 100644
--- a/lib/Serialization/ASTWriter.cpp
+++ b/lib/Serialization/ASTWriter.cpp
@@ -2808,7 +2808,9 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls,
// Set up predefined declaration IDs.
DeclIDs[Context.getTranslationUnitDecl()] = PREDEF_DECL_TRANSLATION_UNIT_ID;
-
+ if (Context.ObjCIdDecl)
+ DeclIDs[Context.ObjCIdDecl] = PREDEF_DECL_OBJC_ID_ID;
+
if (!Chain) {
// Make sure that we emit IdentifierInfos (and any attached
// declarations) for builtins. We don't need to do this when we're
@@ -3015,7 +3017,6 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls,
// Form the record of special types.
RecordData SpecialTypes;
AddTypeRef(Context.getBuiltinVaListType(), SpecialTypes);
- AddTypeRef(Context.ObjCIdTypedefType, SpecialTypes);
AddTypeRef(Context.ObjCSelTypedefType, SpecialTypes);
AddTypeRef(Context.ObjCProtoType, SpecialTypes);
AddTypeRef(Context.ObjCClassTypedefType, SpecialTypes);