diff options
author | Adrian Prantl <aprantl@apple.com> | 2014-12-23 19:11:54 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2014-12-23 19:11:54 +0000 |
commit | ee24e14bdcedbbd6d997780404b170e920bf7c42 (patch) | |
tree | e37344072780b78cb893ccd9a0eea82e440b2023 | |
parent | 48af2ef40feba3cccfd5cf951b7937c1f5f11947 (diff) | |
download | bcm5719-llvm-ee24e14bdcedbbd6d997780404b170e920bf7c42.tar.gz bcm5719-llvm-ee24e14bdcedbbd6d997780404b170e920bf7c42.zip |
Debug Info: Pass the pointer size into createMemberPointerType().
Paired commit with LLVM.
llvm-svn: 224781
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 5 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-method.cpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 7a5c90a1ccf..8b18b296f51 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1889,7 +1889,8 @@ llvm::DIType CGDebugInfo::CreateType(const MemberPointerType *Ty, llvm::DIType ClassType = getOrCreateType(QualType(Ty->getClass(), 0), U); if (!Ty->getPointeeType()->isFunctionType()) return DBuilder.createMemberPointerType( - getOrCreateType(Ty->getPointeeType(), U), ClassType); + getOrCreateType(Ty->getPointeeType(), U), ClassType, + CGM.PointerWidthInBits); const FunctionProtoType *FPT = Ty->getPointeeType()->getAs<FunctionProtoType>(); @@ -1897,7 +1898,7 @@ llvm::DIType CGDebugInfo::CreateType(const MemberPointerType *Ty, getOrCreateInstanceMethodType(CGM.getContext().getPointerType(QualType( Ty->getClass(), FPT->getTypeQuals())), FPT, U), - ClassType); + ClassType, CGM.PointerWidthInBits); } llvm::DIType CGDebugInfo::CreateType(const AtomicType *Ty, llvm::DIFile U) { diff --git a/clang/test/CodeGenCXX/debug-info-method.cpp b/clang/test/CodeGenCXX/debug-info-method.cpp index 690193e10ba..bb69a651650 100644 --- a/clang/test/CodeGenCXX/debug-info-method.cpp +++ b/clang/test/CodeGenCXX/debug-info-method.cpp @@ -2,7 +2,7 @@ // CHECK: !"_ZTS1A"} ; [ DW_TAG_class_type ] [A] // CHECK: !"{{.*}}\00_ZN1A3fooEiS_3$_0\00{{.*}}", {{.*}} [protected] // CHECK: ![[THISTYPE:[0-9]+]] = {{.*}} ; [ DW_TAG_pointer_type ] {{.*}} [artificial] [from _ZTS1A] -// CHECK: DW_TAG_ptr_to_member_type +// CHECK: [ DW_TAG_ptr_to_member_type ] [line {{[0-9]+}}, size {{[1-9][0-9]+}}, align // CHECK: {{.*}}![[MEMFUNTYPE:[0-9]+]], !{{.*}}} ; [ DW_TAG_ptr_to_member_type ] {{.*}} [from ] // CHECK: ![[MEMFUNTYPE]] = {{.*}}![[MEMFUNARGS:[0-9]+]], null, null, null} ; [ DW_TAG_subroutine_type ] {{.*}} [from ] // CHECK: ![[MEMFUNARGS]] = {{.*}}, ![[THISTYPE]], |