+2019-04-29 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * ada-lang.c (ada_is_character_type): Change return type to bool.
+ (ada_is_string_type): Likewise.
+ * ada-lang.h (ada_is_character_type): Update declaration
+ (ada_is_string_type): Likewise.
+
2019-04-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
Support style in 'frame|thread apply'
[At the moment, this is true only for Character and Wide_Character;
It is a heuristic test that could stand improvement]. */
-int
+bool
ada_is_character_type (struct type *type)
{
const char *name;
/* If the type code says it's a character, then assume it really is,
and don't check any further. */
if (TYPE_CODE (type) == TYPE_CODE_CHAR)
- return 1;
+ return true;
/* Otherwise, assume it's a character type iff it is a discrete type
with a known character type name. */
/* True if TYPE appears to be an Ada string type. */
-int
+bool
ada_is_string_type (struct type *type)
{
type = ada_check_typedef (type);
return ada_is_character_type (elttype);
}
else
- return 0;
+ return false;
}
/* The compiler sometimes provides a parallel XVS type for a given
extern struct type *ada_coerce_to_simple_array_type (struct type *);
-extern int ada_is_character_type (struct type *);
+extern bool ada_is_character_type (struct type *);
-extern int ada_is_string_type (struct type *);
+extern bool ada_is_string_type (struct type *);
extern int ada_is_tagged_type (struct type *, int);