aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-04-30 21:35:41 +0000
committerJohn McCall <rjmccall@apple.com>2010-04-30 21:35:41 +0000
commit2888b65aae768f54062505330df7be230a0510c7 (patch)
tree395e9d004f673cb907c07e3102314a4f315e7991 /lib/AST/ASTContext.cpp
parent72be24f39c162448e53dd73cf57cc6357114361e (diff)
When synthesizing Objective C records, give the synthetic fields public
access. Fixes an assertion. Fixes rdar://problem/7927811. Too lazy to reduce a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 4d7ea40079..eea727deb4 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -2833,6 +2833,7 @@ QualType ASTContext::getCFConstantStringType() {
FieldTypes[i], /*TInfo=*/0,
/*BitWidth=*/0,
/*Mutable=*/false);
+ Field->setAccess(AS_public);
CFConstantStringTypeDecl->addDecl(Field);
}
@@ -2872,6 +2873,7 @@ QualType ASTContext::getNSConstantStringType() {
FieldTypes[i], /*TInfo=*/0,
/*BitWidth=*/0,
/*Mutable=*/false);
+ Field->setAccess(AS_public);
NSConstantStringTypeDecl->addDecl(Field);
}
@@ -2909,6 +2911,7 @@ QualType ASTContext::getObjCFastEnumerationStateType() {
FieldTypes[i], /*TInfo=*/0,
/*BitWidth=*/0,
/*Mutable=*/false);
+ Field->setAccess(AS_public);
ObjCFastEnumerationStateTypeDecl->addDecl(Field);
}
@@ -2946,6 +2949,7 @@ QualType ASTContext::getBlockDescriptorType() {
FieldTypes[i], /*TInfo=*/0,
/*BitWidth=*/0,
/*Mutable=*/false);
+ Field->setAccess(AS_public);
T->addDecl(Field);
}
@@ -2994,6 +2998,7 @@ QualType ASTContext::getBlockDescriptorExtendedType() {
FieldTypes[i], /*TInfo=*/0,
/*BitWidth=*/0,
/*Mutable=*/false);
+ Field->setAccess(AS_public);
T->addDecl(Field);
}
@@ -3071,6 +3076,7 @@ QualType ASTContext::BuildByRefType(const char *DeclName, QualType Ty) {
&Idents.get(FieldNames[i]),
FieldTypes[i], /*TInfo=*/0,
/*BitWidth=*/0, /*Mutable=*/false);
+ Field->setAccess(AS_public);
T->addDecl(Field);
}
@@ -3115,6 +3121,7 @@ QualType ASTContext::getBlockParmType(
&Idents.get(FieldNames[i]),
FieldTypes[i], /*TInfo=*/0,
/*BitWidth=*/0, /*Mutable=*/false);
+ Field->setAccess(AS_public);
T->addDecl(Field);
}
@@ -3135,6 +3142,7 @@ QualType ASTContext::getBlockParmType(
FieldDecl *Field = FieldDecl::Create(*this, T, SourceLocation(),
Name, FieldType, /*TInfo=*/0,
/*BitWidth=*/0, /*Mutable=*/false);
+ Field->setAccess(AS_public);
T->addDecl(Field);
}