]> granicus.if.org Git - clang/commitdiff
Debug Info: Pass the pointer size into createMemberPointerType().
authorAdrian Prantl <aprantl@apple.com>
Tue, 23 Dec 2014 19:11:54 +0000 (19:11 +0000)
committerAdrian Prantl <aprantl@apple.com>
Tue, 23 Dec 2014 19:11:54 +0000 (19:11 +0000)
Paired commit with LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224781 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp
test/CodeGenCXX/debug-info-method.cpp

index 7a5c90a1ccfcb2c7339a8d25a70863bdf18fc80c..8b18b296f518444db44b7035bc325a374d2326b2 100644 (file)
@@ -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) {
index 690193e10baacc0c59a00c47f4a16ac5e94aef7d..bb69a651650779095041e93cd83602c3b3993216 100644 (file)
@@ -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]],