Patch to implement "Protocol" as a built-in type declared as
"@class Protocol;"
llvm-svn: 44670
diff --git a/clang/AST/ASTContext.cpp b/clang/AST/ASTContext.cpp
index 3f5a7fb..e8ed9a2 100644
--- a/clang/AST/ASTContext.cpp
+++ b/clang/AST/ASTContext.cpp
@@ -1121,15 +1121,10 @@
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)