From fb4330f255e5db564855ffbc0a34b335ff930a0f Mon Sep 17 00:00:00 2001 From: Steve Naroff Date: Wed, 17 Jun 2009 22:40:22 +0000 Subject: First step toward fixing refactor clang objc type representation. Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType). This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types). No functionality change. llvm-svn: 73649 --- clang/lib/Frontend/PCHWriter.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'clang/lib/Frontend/PCHWriter.cpp') diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp index 765fecbf852..3b1eb080f22 100644 --- a/clang/lib/Frontend/PCHWriter.cpp +++ b/clang/lib/Frontend/PCHWriter.cpp @@ -229,12 +229,14 @@ PCHTypeWriter::VisitObjCQualifiedInterfaceType( Code = pch::TYPE_OBJC_QUALIFIED_INTERFACE; } -void PCHTypeWriter::VisitObjCQualifiedIdType(const ObjCQualifiedIdType *T) { +void +PCHTypeWriter::VisitObjCObjectPointerType(const ObjCObjectPointerType *T) { + Writer.AddDeclRef(T->getDecl(), Record); Record.push_back(T->getNumProtocols()); - for (ObjCQualifiedIdType::qual_iterator I = T->qual_begin(), + for (ObjCInterfaceType::qual_iterator I = T->qual_begin(), E = T->qual_end(); I != E; ++I) Writer.AddDeclRef(*I, Record); - Code = pch::TYPE_OBJC_QUALIFIED_ID; + Code = pch::TYPE_OBJC_OBJECT_POINTER; } //===----------------------------------------------------------------------===// @@ -407,7 +409,7 @@ void PCHWriter::WriteBlockInfoBlock() { RECORD(TYPE_ENUM); RECORD(TYPE_OBJC_INTERFACE); RECORD(TYPE_OBJC_QUALIFIED_INTERFACE); - RECORD(TYPE_OBJC_QUALIFIED_ID); + RECORD(TYPE_OBJC_OBJECT_POINTER); // Statements and Exprs can occur in the Types block. AddStmtsExprs(Stream, Record); -- cgit v1.2.3