summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/debug-info-export_symbols.cpp
diff options
context:
space:
mode:
authorShafik Yaghmour <syaghmour@apple.com>2019-08-27 20:17:35 +0000
committerShafik Yaghmour <syaghmour@apple.com>2019-08-27 20:17:35 +0000
commit528f5da6d862f59c6e005f85eb32a0c67f65bc4d (patch)
tree17404f18575d0c9a83e0d9ba026a052fb3bf3e9c /clang/test/CodeGenCXX/debug-info-export_symbols.cpp
parent0c01d920512c87d5b6daec2b7232e3728c8def8f (diff)
downloadbcm5719-llvm-528f5da6d862f59c6e005f85eb32a0c67f65bc4d.tar.gz
bcm5719-llvm-528f5da6d862f59c6e005f85eb32a0c67f65bc4d.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 in CGDebugInfo::CreateLimitedType(...) for this new flag and an accompanying test to verify this feature. Differential Revision: https://reviews.llvm.org/D66667 llvm-svn: 370107
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info-export_symbols.cpp')
-rw-r--r--clang/test/CodeGenCXX/debug-info-export_symbols.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-export_symbols.cpp b/clang/test/CodeGenCXX/debug-info-export_symbols.cpp
new file mode 100644
index 00000000000..19697beaf2f
--- /dev/null
+++ b/clang/test/CodeGenCXX/debug-info-export_symbols.cpp
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple %itanium_abi_triple %s -o - | FileCheck %s
+
+// CHECK: [[SCOPE:![0-9]+]] = distinct !DICompositeType({{.*}}flags: DIFlagTypePassByValue
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, scope: [[SCOPE]]
+// CHECK-SAME: DIFlagExportSymbols | DIFlagTypePassByValue
+struct A {
+ // Anonymous class exports its symbols into A
+ struct {
+ int y;
+ };
+} a;
OpenPOWER on IntegriCloud