]> granicus.if.org Git - clang/commitdiff
PCH support for ObjCCategoryImplDecl (which can't be tested now).
authorDouglas Gregor <dgregor@apple.com>
Thu, 23 Apr 2009 02:53:57 +0000 (02:53 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 23 Apr 2009 02:53:57 +0000 (02:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69856 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclObjC.h
lib/Frontend/PCHReader.cpp
lib/Frontend/PCHWriter.cpp

index de32afa18f5cd3bd652680e7a3456f70e5b9eb2d..0e1de5e8aa5ed1bcb01d11fbb9340ebf538b5614 100644 (file)
@@ -904,7 +904,8 @@ public:
   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*).
index c3d4bcfa52990653f42325583f1c55c2088300cf..0ad93dc65ccd05c45ca0f3168e569cb552928b7c 100644 (file)
@@ -329,7 +329,7 @@ void PCHDeclReader::VisitObjCImplDecl(ObjCImplDecl *D) {
 
 void PCHDeclReader::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D) {
   VisitObjCImplDecl(D);
-  // FIXME: Implement.
+  D->setIdentifier(Reader.GetIdentifierInfo(Record, Idx));
 }
 
 void PCHDeclReader::VisitObjCImplementationDecl(ObjCImplementationDecl *D) {
@@ -2265,7 +2265,7 @@ Decl *PCHReader::ReadDeclRecord(uint64_t Offset, unsigned Index) {
   }
 
   case pch::DECL_OBJC_CATEGORY_IMPL: {
-    // FIXME: Implement.
+    D = ObjCCategoryImplDecl::Create(Context, 0, SourceLocation(), 0, 0);
     break;
   }
   
index 36d9170f38a3e3e7c3530b0a1a94145f8e24c2da..0a0a38d874013a599cb77eda79a4082ab7a16276 100644 (file)
@@ -500,7 +500,7 @@ void PCHDeclWriter::VisitObjCImplDecl(ObjCImplDecl *D) {
 
 void PCHDeclWriter::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D) {
   VisitObjCImplDecl(D);
-  // FIXME: Implement.
+  Writer.AddIdentifierRef(D->getIdentifier(), Record);
   Code = pch::DECL_OBJC_CATEGORY_IMPL;
 }