V(IsStructField, 4) \
V(EncodeBlockParameters, 5) \
V(EncodeClassNames, 6) \
- V(EncodePointerToObjCTypedef, 7)
#define V(N,I) ObjCEncOptions& set##N() { Bits |= 1 << I; return *this; }
OPT_LIST(V)
LLVM_NODISCARD ObjCEncOptions forComponentType() const {
ObjCEncOptions Mask = ObjCEncOptions()
.setIsOutermostType()
- .setIsStructField()
- .setEncodePointerToObjCTypedef();
+ .setIsStructField();
return Bits & ~Mask.Bits;
}
};
getObjCEncodingForTypeImpl(Field->getType(), S,
ObjCEncOptions().setExpandStructures(),
Field);
- else {
- ObjCEncOptions NewOptions = ObjCEncOptions().setExpandStructures();
- if (Options.EncodePointerToObjCTypedef())
- NewOptions.setEncodePointerToObjCTypedef();
- getObjCEncodingForTypeImpl(Field->getType(), S, NewOptions, FD,
+ else
+ getObjCEncodingForTypeImpl(Field->getType(), S,
+ ObjCEncOptions().setExpandStructures(), FD,
NotEncodedT);
- }
}
}
S += '}';
return;
}
- QualType PointeeTy = OPT->getPointeeType();
- if (!Options.EncodingProperty() &&
- isa<TypedefType>(PointeeTy.getTypePtr()) &&
- !Options.EncodePointerToObjCTypedef()) {
- // Another historical/compatibility reason.
- // We encode the underlying type which comes out as
- // {...};
- S += '^';
- if (FD && OPT->getInterfaceDecl()) {
- // Prevent recursive encoding of fields in some rare cases.
- ObjCInterfaceDecl *OI = OPT->getInterfaceDecl();
- SmallVector<const ObjCIvarDecl*, 32> Ivars;
- DeepCollectObjCIvars(OI, true, Ivars);
- for (unsigned i = 0, e = Ivars.size(); i != e; ++i) {
- if (Ivars[i] == FD) {
- S += '{';
- S += OI->getObjCRuntimeNameAsString();
- S += '}';
- return;
- }
- }
- }
- ObjCEncOptions NewOptions =
- ObjCEncOptions().setEncodePointerToObjCTypedef();
- if (Options.ExpandPointedToStructures())
- NewOptions.setExpandStructures();
- getObjCEncodingForTypeImpl(PointeeTy, S, NewOptions, /*Field=*/nullptr);
- return;
- }
-
S += '@';
if (OPT->getInterfaceDecl() &&
(FD || Options.EncodingProperty() || Options.EncodeClassNames())) {
@synthesize property = _property;
@end
-// CHECK: private unnamed_addr constant [24 x i8] c"^{BABugExample=@}16
+// CHECK: private unnamed_addr constant [8 x i8] c"@16
// rdar://14408244
@class SCNCamera;
C3DCameraStorage _storage;
}
@end
-// CHECK: private unnamed_addr constant [39 x i8] c"{?=\22presentationInstance\22^{SCNCamera}}\00"
+// CHECK: private unnamed_addr constant [39 x i8] c"{?=\22presentationInstance\22@\22SCNCamera\22}\00"
// rdar://16655340
int i;