From cf44e7870b41b0a9c7aeaa33df226d5204b790db Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 19 Dec 2014 00:01:20 +0000 Subject: Explain why LLVM is emitting a DW_AT_containing_type inside of a class. llvm-svn: 224555 --- llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index b616e54df5c..7606a61ff71 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -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, -- cgit v1.2.3