From 66c5dfc193c4090b67c5effb0e80e287b94de17e Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Fri, 7 Dec 2007 00:18:54 +0000 Subject: Patch to implement "Protocol" as a built-in type declared as "@class Protocol;" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44670 91177308-0d34-0410-b5e6-96231b3b80d8 --- AST/ASTContext.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'AST/ASTContext.cpp') diff --git a/AST/ASTContext.cpp b/AST/ASTContext.cpp index 3f5a7fbc58..e8ed9a209f 100644 --- a/AST/ASTContext.cpp +++ b/AST/ASTContext.cpp @@ -1121,15 +1121,10 @@ void ASTContext::setObjcSelType(TypedefDecl *TD) SelStructType = rec; } -void ASTContext::setObjcProtoType(TypedefDecl *TD) +void ASTContext::setObjcProtoType(QualType QT) { assert(ObjcProtoType.isNull() && "'Protocol' type already set!"); - - // typedef struct Protocol Protocol; - ObjcProtoType = TD->getUnderlyingType(); - // Protocol * type - ObjcProtoType = getPointerType(ObjcProtoType); - ProtoStructType = TD->getUnderlyingType()->getAsStructureType(); + ObjcProtoType = QT; } void ASTContext::setObjcClassType(TypedefDecl *TD) -- cgit v1.2.3-70-g09d2