summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
diff options
context:
space:
mode:
authorShafik Yaghmour <syaghmour@apple.com>2019-08-26 20:59:44 +0000
committerShafik Yaghmour <syaghmour@apple.com>2019-08-26 20:59:44 +0000
commit90e00bd8f3e1e03a9390c2531b90117498d2c78f (patch)
tree9c0637093b0f01a74f77d19017340bc0709071a9 /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
parent72797ba072c02dd2d1c25b2d8a0735d8c6eb0134 (diff)
downloadbcm5719-llvm-90e00bd8f3e1e03a9390c2531b90117498d2c78f.tar.gz
bcm5719-llvm-90e00bd8f3e1e03a9390c2531b90117498d2c78f.zip
Debug Info: Support for DW_AT_export_symbols for anonymous structs
This implements the DWARF 5 feature described in: http://dwarfstd.org/ShowIssue.php?issue=141212.1 To support recognizing anonymous structs: struct A { struct { // Anonymous struct int y; }; } a This patch adds support for the new flag in constructTypeDIE(...) and test to verify this change. Differential Revision: https://reviews.llvm.org/D66605 llvm-svn: 369969
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index 4990ea66cc1..834ea358736 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -946,6 +946,9 @@ void DwarfUnit::constructTypeDIE(DIE &Buffer, const DICompositeType *CTy) {
if (CTy->isAppleBlockExtension())
addFlag(Buffer, dwarf::DW_AT_APPLE_block);
+ if (CTy->getExportSymbols())
+ addFlag(Buffer, dwarf::DW_AT_export_symbols);
+
// 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.
// Rust uses DW_AT_containing_type to link a vtable to the type
OpenPOWER on IntegriCloud