forked from OSchip/llvm-project
C++/ABI/x86_64: Member pointers should be classified as INTEGER.
llvm-svn: 103843
This commit is contained in:
parent
4bd95c65e7
commit
36d4d1541c
|
@ -853,6 +853,11 @@ void X86_64ABIInfo::classify(QualType Ty,
|
||||||
classify(ET->getDecl()->getIntegerType(), Context, OffsetBase, Lo, Hi);
|
classify(ET->getDecl()->getIntegerType(), Context, OffsetBase, Lo, Hi);
|
||||||
} else if (Ty->hasPointerRepresentation()) {
|
} else if (Ty->hasPointerRepresentation()) {
|
||||||
Current = Integer;
|
Current = Integer;
|
||||||
|
} else if (Ty->isMemberPointerType()) {
|
||||||
|
if (Ty->isMemberFunctionPointerType())
|
||||||
|
Lo = Hi = Integer;
|
||||||
|
else
|
||||||
|
Current = Integer;
|
||||||
} else if (const VectorType *VT = Ty->getAs<VectorType>()) {
|
} else if (const VectorType *VT = Ty->getAs<VectorType>()) {
|
||||||
uint64_t Size = Context.getTypeSize(VT);
|
uint64_t Size = Context.getTypeSize(VT);
|
||||||
if (Size == 32) {
|
if (Size == 32) {
|
||||||
|
|
|
@ -25,3 +25,11 @@ void f2(f2_s1 a0) { }
|
||||||
struct s3_0 {};
|
struct s3_0 {};
|
||||||
struct s3_1 { struct s3_0 a; long b; };
|
struct s3_1 { struct s3_0 a; long b; };
|
||||||
void f3(struct s3_1 x) {}
|
void f3(struct s3_1 x) {}
|
||||||
|
|
||||||
|
// CHECK: define i64 @_Z4f4_0M2s4i(i64)
|
||||||
|
// CHECK: define [[i64_i64_ty]] @_Z4f4_1M2s4FivE([[i64_i64_ty]])
|
||||||
|
struct s4 {};
|
||||||
|
typedef int s4::* s4_mdp;
|
||||||
|
typedef int (s4::*s4_mfp)();
|
||||||
|
s4_mdp f4_0(s4_mdp a) { return a; }
|
||||||
|
s4_mfp f4_1(s4_mfp a) { return a; }
|
||||||
|
|
Loading…
Reference in New Issue