Debug Info: In symmetry to DW_TAG_pointer_type, do not emit the byte size
[opencl/llvm.git] / lib / CodeGen / AsmPrinter / DwarfUnit.cpp
index 7606a61ff714b59a4d99296c43a316c615bbfe46..f630b6ab64c89e5a253ad673ef22d108d6632538 100644 (file)
@@ -985,7 +985,8 @@ void DwarfUnit::constructTypeDIE(DIE &Buffer, DIDerivedType DTy) {
     addString(Buffer, dwarf::DW_AT_name, Name);
 
   // Add size if non-zero (derived types might be zero-sized.)
-  if (Size && Tag != dwarf::DW_TAG_pointer_type)
+  if (Size && Tag != dwarf::DW_TAG_pointer_type
+           && Tag != dwarf::DW_TAG_ptr_to_member_type)
     addUInt(Buffer, dwarf::DW_AT_byte_size, None, Size);
 
   if (Tag == dwarf::DW_TAG_ptr_to_member_type)