dont do padding members for unions, oops

This commit is contained in:
Ryan Fleury
2024-02-02 17:15:55 -08:00
parent f796f64c2f
commit cbe842c5ec
+4
View File
@@ -965,6 +965,7 @@ internal TG_MemberArray
tg_data_members_from_graph_raddbg_key(Arena *arena, TG_Graph *graph, RADDBG_Parsed *rdbg, TG_Key key)
{
Temp scratch = scratch_begin(&arena, 1);
TG_Kind root_type_kind = tg_kind_from_key(key);
//- rjf: walk type tree; gather members list
TG_MemberList members_list = {0};
@@ -1051,6 +1052,8 @@ tg_data_members_from_graph_raddbg_key(Arena *arena, TG_Graph *graph, RADDBG_Pars
PaddingNode *first_padding = 0;
PaddingNode *last_padding = 0;
U64 padding_count = 0;
if(root_type_kind == TG_Kind_Struct || root_type_kind == TG_Kind_Class)
{
for(U64 idx = 0; idx < members.count; idx += 1)
{
TG_Member *member = &members.v[idx];
@@ -1069,6 +1072,7 @@ tg_data_members_from_graph_raddbg_key(Arena *arena, TG_Graph *graph, RADDBG_Pars
}
}
}
}
//- rjf: produce new members array, if we have any padding
if(padding_count != 0)