return;
}
else if (PointeeTy->isObjCInterfaceType()) {
+ if (dyn_cast<TypedefType>(PointeeTy.getTypePtr())) {
+ // Another historical/compatibility reason.
+ // We encode the underlying type which comes out as
+ // {...};
+ S += '^';
+ getObjCEncodingForTypeImpl(PointeeTy, S,
+ false, ExpandPointedToStructures,
+ NULL);
+ return;
+ }
S += '@';
if (FD) {
ObjCInterfaceDecl *OI = PointeeTy->getAsObjCInterfaceType()->getDecl();
// RUN: grep -e "{Derived=#ib32b8b3b8sb16b8b8b2b8ccb6}" %t | count 1 &&
// RUN: grep -e "{B1=#@c}" %t | count 1 &&
// RUN: grep -e "v12@0:4\[3\[4{Test=i}]]8" %t | count 1 &&
-// RUN: grep -e "r^{S=i}" %t | count 1
+// RUN: grep -e "r^{S=i}" %t | count 1 &&
+// RUN: grep -e "\^{Object=#}" %t | count 1
@class Int1;
struct S { int iS; };
+@interface Object
+{
+ Class isa;
+}
+@end
+typedef Object MyObj;
+
int main()
{
const char *en = @encode(Derived);
const char *eb = @encode(B1);
const char *es = @encode(const struct S *);
const char *ec = @encode(const struct S);
+ const char *ee = @encode(MyObj *const);
}