summaryrefslogtreecommitdiffstats
path: root/clang/AST/ASTContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/AST/ASTContext.cpp')
-rw-r--r--clang/AST/ASTContext.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/AST/ASTContext.cpp b/clang/AST/ASTContext.cpp
index 4c06e7c88cb..cf617d190ee 100644
--- a/clang/AST/ASTContext.cpp
+++ b/clang/AST/ASTContext.cpp
@@ -870,6 +870,17 @@ void ASTContext::setObjcSelType(TypedefDecl *TD)
SelStructType = rec;
}
+void ASTContext::setObjcProtoType(TypedefDecl *TD)
+{
+ assert(ObjcProtoType.isNull() && "'Protocol' type already set!");
+
+ // typedef struct Protocol Protocol;
+ ObjcProtoType = TD->getUnderlyingType();
+ // Protocol * type
+ ObjcProtoType = getPointerType(ObjcProtoType);
+ ProtoStructType = TD->getUnderlyingType()->getAsStructureType();
+}
+
void ASTContext::setObjcConstantStringInterface(ObjcInterfaceDecl *Decl) {
assert(ObjcConstantStringType.isNull() &&
"'NSConstantString' type already set!");
OpenPOWER on IntegriCloud