size_t len;
if (is_type_compound(top_type)) {
- compound_t *compound = top_type->compound.compound;
- entity_t *entry = compound->members.entities;
+ compound_t *const compound = top_type->compound.compound;
+ entity_t *const entry = skip_unnamed_bitfields(compound->members.entities);
top->compound_entry = entry;
top->index = 0;
entity_t *entry = top->compound_entry;
top->index++;
- entry = entry->base.next;
+ entry = skip_unnamed_bitfields(entry->base.next);
top->compound_entry = entry;
if (entry != NULL) {
assert(entry->kind == ENTITY_COMPOUND_MEMBER);
return ELF_VISIBILITY_ERROR;
}
}
+
+entity_t *skip_unnamed_bitfields(entity_t *entry)
+{
+ for (; entry != NULL; entry = entry->base.next) {
+ assert(entry->kind == ENTITY_COMPOUND_MEMBER);
+ if (!entry->compound_member.bitfield || entry->base.symbol != NULL)
+ break;
+ }
+ return entry;
+}
elf_visibility_tag_t get_elf_visibility_from_string(const char *string);
+entity_t *skip_unnamed_bitfields(entity_t*);
+
#endif
return result;
}
-static entity_t *skip_unnamed_bitfields(entity_t *entry)
-{
- for (; entry != NULL; entry = entry->base.next) {
- assert(entry->kind == ENTITY_COMPOUND_MEMBER);
- if (!entry->compound_member.bitfield || entry->base.symbol != NULL)
- break;
- }
- return entry;
-}
-
/**
* Descending into a sub-type. Enter the scope of the current top_type.
*/