[llvm] r224555 - Explain why LLVM is emitting a DW_AT_containing_type inside of a class.
Adrian Prantl
aprantl at apple.com
Thu Dec 18 16:01:20 PST 2014
Author: adrian
Date: Thu Dec 18 18:01:20 2014
New Revision: 224555
URL: http://llvm.org/viewvc/llvm-project?rev=224555&view=rev
Log:
Explain why LLVM is emitting a DW_AT_containing_type inside of a class.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=224555&r1=224554&r2=224555&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Thu Dec 18 18:01:20 2014
@@ -1118,6 +1118,8 @@ void DwarfUnit::constructTypeDIE(DIE &Bu
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,
More information about the llvm-commits
mailing list