Explain why LLVM is emitting a DW_AT_containing_type inside of a class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224555 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adrian Prantl 2014-12-19 00:01:20 +00:00
parent 827f4eb6a3
commit 7a6f0084e2

View File

@ -1118,6 +1118,8 @@ void DwarfUnit::constructTypeDIE(DIE &Buffer, DICompositeType CTy) {
if (CTy.isAppleBlockExtension())
addFlag(Buffer, dwarf::DW_AT_APPLE_block);
// This is outside the DWARF spec, but GDB expects a DW_AT_containing_type
// inside C++ composite types to point to the base class with the vtable.
DICompositeType ContainingType(resolve(CTy.getContainingType()));
if (ContainingType)
addDIEEntry(Buffer, dwarf::DW_AT_containing_type,