[cfe-commits] r79583 - in /cfe/trunk: include/clang/Frontend/PCHBitCodes.h lib/Frontend/PCHReader.cpp lib/Frontend/PCHWriter.cpp
Douglas Gregor
dgregor at apple.com
Thu Aug 20 17:27:50 PDT 2009
Author: dgregor
Date: Thu Aug 20 19:27:50 2009
New Revision: 79583
URL: http://llvm.org/viewvc/llvm-project?rev=79583&view=rev
Log:
Make the new Objective-C "id" and "Class" redefinition types special
types that are preloaded by the PCH file. Fixes PCH breakage
introduced in r79248.
Modified:
cfe/trunk/include/clang/Frontend/PCHBitCodes.h
cfe/trunk/lib/Frontend/PCHReader.cpp
cfe/trunk/lib/Frontend/PCHWriter.cpp
Modified: cfe/trunk/include/clang/Frontend/PCHBitCodes.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/PCHBitCodes.h?rev=79583&r1=79582&r2=79583&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/PCHBitCodes.h (original)
+++ cfe/trunk/include/clang/Frontend/PCHBitCodes.h Thu Aug 20 19:27:50 2009
@@ -427,7 +427,11 @@
/// \brief C jmp_buf typedef type
SPECIAL_TYPE_jmp_buf = 8,
/// \brief C sigjmp_buf typedef type
- SPECIAL_TYPE_sigjmp_buf = 9
+ SPECIAL_TYPE_sigjmp_buf = 9,
+ /// \brief Objective-C "id" redefinition type
+ SPECIAL_TYPE_OBJC_ID_REDEFINITION = 10,
+ /// \brief Objective-C "Class" redefinition type
+ SPECIAL_TYPE_OBJC_CLASS_REDEFINITION = 11,
};
/// \brief Record codes for each kind of declaration.
Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=79583&r1=79582&r2=79583&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReader.cpp Thu Aug 20 19:27:50 2009
@@ -1562,6 +1562,12 @@
Context->setsigjmp_bufDecl(Tag->getDecl());
}
}
+ if (unsigned ObjCIdRedef
+ = SpecialTypes[pch::SPECIAL_TYPE_OBJC_ID_REDEFINITION])
+ Context->ObjCIdRedefinitionType = GetType(ObjCIdRedef);
+ if (unsigned ObjCClassRedef
+ = SpecialTypes[pch::SPECIAL_TYPE_OBJC_CLASS_REDEFINITION])
+ Context->ObjCClassRedefinitionType = GetType(ObjCClassRedef);
}
/// \brief Retrieve the name of the original source file name
Modified: cfe/trunk/lib/Frontend/PCHWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHWriter.cpp?rev=79583&r1=79582&r2=79583&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHWriter.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHWriter.cpp Thu Aug 20 19:27:50 2009
@@ -1846,6 +1846,8 @@
AddTypeRef(Context.getFILEType(), Record);
AddTypeRef(Context.getjmp_bufType(), Record);
AddTypeRef(Context.getsigjmp_bufType(), Record);
+ AddTypeRef(Context.ObjCIdRedefinitionType, Record);
+ AddTypeRef(Context.ObjCClassRedefinitionType, Record);
Stream.EmitRecord(pch::SPECIAL_TYPES, Record);
// Keep writing types and declarations until all types and
More information about the cfe-commits
mailing list