[cfe-commits] r69856 - in /cfe/trunk: include/clang/AST/DeclObjC.h lib/Frontend/PCHReader.cpp lib/Frontend/PCHWriter.cpp
Douglas Gregor
dgregor at apple.com
Wed Apr 22 19:53:57 PDT 2009
Author: dgregor
Date: Wed Apr 22 21:53:57 2009
New Revision: 69856
URL: http://llvm.org/viewvc/llvm-project?rev=69856&view=rev
Log:
PCH support for ObjCCategoryImplDecl (which can't be tested now).
Modified:
cfe/trunk/include/clang/AST/DeclObjC.h
cfe/trunk/lib/Frontend/PCHReader.cpp
cfe/trunk/lib/Frontend/PCHWriter.cpp
Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=69856&r1=69855&r2=69856&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Wed Apr 22 21:53:57 2009
@@ -904,7 +904,8 @@
IdentifierInfo *getIdentifier() const {
return Id;
}
-
+ void setIdentifier(IdentifierInfo *II) { Id = II; }
+
/// getNameAsCString - Get the name of identifier for the class
/// interface associated with this implementation as a C string
/// (const char*).
Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=69856&r1=69855&r2=69856&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReader.cpp Wed Apr 22 21:53:57 2009
@@ -329,7 +329,7 @@
void PCHDeclReader::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D) {
VisitObjCImplDecl(D);
- // FIXME: Implement.
+ D->setIdentifier(Reader.GetIdentifierInfo(Record, Idx));
}
void PCHDeclReader::VisitObjCImplementationDecl(ObjCImplementationDecl *D) {
@@ -2265,7 +2265,7 @@
}
case pch::DECL_OBJC_CATEGORY_IMPL: {
- // FIXME: Implement.
+ D = ObjCCategoryImplDecl::Create(Context, 0, SourceLocation(), 0, 0);
break;
}
Modified: cfe/trunk/lib/Frontend/PCHWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHWriter.cpp?rev=69856&r1=69855&r2=69856&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHWriter.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHWriter.cpp Wed Apr 22 21:53:57 2009
@@ -500,7 +500,7 @@
void PCHDeclWriter::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D) {
VisitObjCImplDecl(D);
- // FIXME: Implement.
+ Writer.AddIdentifierRef(D->getIdentifier(), Record);
Code = pch::DECL_OBJC_CATEGORY_IMPL;
}
More information about the cfe-commits
mailing list