diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index f3468f29c1b370afe32f7961f4620434ccdecfac..844514be27c878410175e9b9b122db59be39ec50 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1199,7 +1199,7 @@ CollectVTableInfo(const CXXRecordDecl *RD, llvm::DIFile Unit, unsigned Size = CGM.getContext().getTypeSize(CGM.getContext().VoidPtrTy); llvm::DIType VPTR = DBuilder.createMemberType(Unit, getVTableName(RD), Unit, - 0, Size, 0, 0, 0, + 0, Size, 0, 0, llvm::DIDescriptor::FlagArtificial, getOrCreateVTablePtrType(Unit)); EltTys.push_back(VPTR); } diff --git a/test/CodeGenCXX/debug-info-class.cpp b/test/CodeGenCXX/debug-info-class.cpp index 062227a02382faf02883a54a09cc92c695df3e61..131693b21a57e6dba23d4eb65587ee2e7a008830 100644 --- a/test/CodeGenCXX/debug-info-class.cpp +++ b/test/CodeGenCXX/debug-info-class.cpp @@ -8,6 +8,11 @@ void func(bar *f) { // CHECK: DW_TAG_class_type union baz; void func(baz *f) { // CHECK: DW_TAG_union_type } +class B { // CHECK: DW_TAG_class_type +public: + virtual ~B(); +// CHECK: metadata !"_vptr$B", {{.*}}, i32 64, metadata !{{.*}}} ; [ DW_TAG_member ] +}; struct A { // CHECK: DW_TAG_structure_type int one; static const int HdrSize = 52; // CHECK: HdrSize @@ -16,8 +21,8 @@ struct A { // CHECK: DW_TAG_structure_type int x = 1; } }; -class B { // CHECK: DW_TAG_class_type -}; + + int main() { A a; B b;