forked from OSchip/llvm-project
Teach the ObjC mangler to ignore member pointers just like gcc does.
llvm-svn: 104001
This commit is contained in:
parent
3b43338870
commit
a9e6e8d654
clang
|
@ -3715,6 +3715,11 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// gcc just blithely ignores member pointers.
|
||||||
|
// TODO: maybe there should be a mangling for these
|
||||||
|
if (T->getAs<MemberPointerType>())
|
||||||
|
return;
|
||||||
|
|
||||||
assert(0 && "@encode for type not implemented!");
|
assert(0 && "@encode for type not implemented!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
// CHECK: v17@0:8{vector<float, float, float>=}16
|
// CHECK: v17@0:8{vector<float, float, float>=}16
|
||||||
// CHECK: {vector<float, float, float>=}
|
// CHECK: {vector<float, float, float>=}
|
||||||
|
// CHECK: v24@0:816
|
||||||
|
|
||||||
template <typename T1, typename T2, typename T3> struct vector {
|
template <typename T1, typename T2, typename T3> struct vector {
|
||||||
vector(T1,T2,T3);
|
vector(T1,T2,T3);
|
||||||
|
@ -37,3 +37,15 @@ typedef vector< float, float, float > vector3f;
|
||||||
[sn setPosition:VF3];
|
[sn setPosition:VF3];
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
class Int3 { int x, y, z; };
|
||||||
|
|
||||||
|
// Enforce @encoding for member pointers.
|
||||||
|
@interface MemPtr {}
|
||||||
|
- (void) foo: (int (Int3::*)) member;
|
||||||
|
@end
|
||||||
|
@implementation MemPtr
|
||||||
|
- (void) foo: (int (Int3::*)) member {
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
Loading…
Reference in New Issue