aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorMark Harmstone <mark@harmstone.com>2024-11-10 00:23:49 +0000
committerMark Harmstone <mark@harmstone.com>2024-11-19 01:06:38 +0000
commitf1f8d4c5115975875b5b1a15adbac50bc28a3922 (patch)
tree515470c89f05932c33379385abdc2a9b3e5da3f8 /gcc/testsuite
parent14d706ed0e90373c98a0ce223ffeea8846f6d9bc (diff)
downloadgcc-f1f8d4c5115975875b5b1a15adbac50bc28a3922.zip
gcc-f1f8d4c5115975875b5b1a15adbac50bc28a3922.tar.gz
gcc-f1f8d4c5115975875b5b1a15adbac50bc28a3922.tar.bz2
Flatten anonymous structs in CodeView types
If a CodeView struct, class, or union has as a member an anonymous struct, class, or union, this gets flattened. The sub-struct's members will appear as if they were part of their parent. For this, we move part of get_type_num_struct into a new function add_to_fieldlist, which also handles creating an LF_INDEX overflow item if an LF_FIELDLIST grows too large. This is because add_struct_member now calls itself recursively, and so needs to handle overflows itself. gcc/ * dwarf2codeview.cc (add_to_fieldlist): New function. (add_struct_member): Call recursively to flatten structs, and call add_to_fieldlist. (add_struct_static_member): Call add_to_fieldlist. (add_struct_function): Call add_to_fieldlist. (add_struct_inheritance): Call add_to_fieldlist. (add_struct_nested_type): Call add_to_fieldlist. (get_type_num_struct): Move code to add_to_fieldlist, and move responsibility for this to subfunctions.
Diffstat (limited to 'gcc/testsuite')
0 files changed, 0 insertions, 0 deletions