/* True if field number FIELD_NUM in struct or union type TYPE is supposed
to be invisible to users. */
-int
+bool
ada_is_ignored_field (struct type *type, int field_num)
{
if (field_num < 0 || field_num > type->num_fields ())
- return 1;
+ return true;
/* Check the name of that field. */
{
/* Anonymous field names should not be printed. */
if (name == nullptr || name[0] == '\0')
- return 1;
+ return true;
/* Skip artificial fields. */
if (type->field (field_num).is_artificial ())
- return 1;
+ return true;
/* Normally, fields whose name start with an underscore ("_")
are fields that have been internally generated by the compiler,
the parent type. This field should not be printed as is, but
should not be ignored either. */
if (name[0] == '_' && !startswith (name, "_parent"))
- return 1;
+ return true;
/* The compiler doesn't document this, but sometimes it emits
a field whose name starts with a capital letter, like 'V148s'.
/* Wrapper field. */
}
else if (c_isupper (name[0]))
- return 1;
+ return true;
}
/* If this is the dispatch table of a tagged type or an interface tag,
if (ada_is_tagged_type (type, 1)
&& (ada_is_dispatch_table_ptr_type (type->field (field_num).type ())
|| ada_is_interface_tag (type->field (field_num).type ())))
- return 1;
+ return true;
/* Not a special field, so it should not be ignored. */
- return 0;
+ return false;
}
/* True iff TYPE has a tag field. If REFOK, then TYPE may also be a
extern struct type *ada_parent_type (struct type *);
-extern int ada_is_ignored_field (struct type *, int);
+extern bool ada_is_ignored_field (struct type *, int);
/* True iff TYPE represents a standard GNAT constrained
packed-array type. */