bool EncodingProperty = false,
bool StructField = false,
bool EncodeBlockParameters = false,
- bool EncodeClassNames = false) const;
+ bool EncodeClassNames = false,
+ bool EncodePointerToObjCTypedef = false) const;
// Adds the encoding of the structure's members.
void getObjCEncodingForStructureImpl(RecordDecl *RD, std::string &S,
bool EncodingProperty,
bool StructField,
bool EncodeBlockParameters,
- bool EncodeClassNames) const {
+ bool EncodeClassNames,
+ bool EncodePointerToObjCTypedef) const {
CanQualType CT = getCanonicalType(T);
switch (CT->getTypeClass()) {
case Type::Builtin:
if (Field->isBitField())
getObjCEncodingForTypeImpl(Field->getType(), S, false, true, Field);
else
- getObjCEncodingForTypeImpl(Field->getType(), S, false, true, FD);
+ getObjCEncodingForTypeImpl(Field->getType(), S, false, true, FD,
+ false, false, false, false, false,
+ EncodePointerToObjCTypedef);
}
S += '}';
return;
QualType PointeeTy = OPT->getPointeeType();
if (!EncodingProperty &&
- isa<TypedefType>(PointeeTy.getTypePtr())) {
+ isa<TypedefType>(PointeeTy.getTypePtr()) &&
+ !EncodePointerToObjCTypedef) {
// Another historical/compatibility reason.
// We encode the underlying type which comes out as
// {...};
S += '^';
getObjCEncodingForTypeImpl(PointeeTy, S,
false, ExpandPointedToStructures,
- NULL);
+ NULL,
+ false, false, false, false, false,
+ /*EncodePointerToObjCTypedef*/true);
return;
}
// CHECK: internal global [14 x i8] c"v16@0:8{?=}16
// CHECK: internal global [26 x i8] c"v32@0:8{?=}16*16{?=}24d24
+
+// rdar://13190095
+@interface NSObject @end
+
+@class BABugExample;
+typedef BABugExample BABugExampleRedefinition;
+
+@interface BABugExample : NSObject {
+ BABugExampleRedefinition *_property; // .asciz "^{BABugExample=^{BABugExample}}"
+}
+@property (copy) BABugExampleRedefinition *property;
+@end
+
+@implementation BABugExample
+@synthesize property = _property;
+@end
+
+// CHECK: internal global [24 x i8] c"^{BABugExample=@}16