summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-01-26 21:16:06 +0000
committerDevang Patel <dpatel@apple.com>2010-01-26 21:16:06 +0000
commit303a1beea639cc5920aceae724800de59c5bccf9 (patch)
tree71f028521ea5a74ff154599f156c2443c89c3294 /llvm/lib/CodeGen/AsmPrinter
parentf4b25d6d7b946ad77f47dfa510fcdd396ea6f3a8 (diff)
downloadbcm5719-llvm-303a1beea639cc5920aceae724800de59c5bccf9.tar.gz
bcm5719-llvm-303a1beea639cc5920aceae724800de59c5bccf9.zip
Emit DW_AT_containing_type attribute for a class if containing type is known.
llvm-svn: 94587
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 532a68f5eaa..0bc7f328666 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -949,6 +949,11 @@ void DwarfDebug::constructTypeDIE(DIE &Buffer, DICompositeType CTy) {
if (RLang)
addUInt(&Buffer, dwarf::DW_AT_APPLE_runtime_class,
dwarf::DW_FORM_data1, RLang);
+
+ DICompositeType ContainingType = CTy.getContainingType();
+ if (!ContainingType.isNull())
+ addDIEEntry(&Buffer, dwarf::DW_AT_containing_type, dwarf::DW_FORM_ref4,
+ getOrCreateTypeDIE(DIType(ContainingType.getNode())));
break;
}
default:
OpenPOWER on IntegriCloud