+2001-12-11 Fred Fish <fnf@redhat.com>
+
+ * c-typeprint.c (c_type_print_base): Use type flags access macros
+ to test bits.
+ * ch-typeprint.c (chill_type_print_base): Ditto.
+ * ch-valprint.c (chill_val_print): Ditto.
+ * d10v-tdep.c (d10v_pointer_to_address): Ditto.
+ * dwarf2read.c (dwarf2_add_member_fn): Ditto.
+ * dwarfread.c (read_structure_scope): Ditto.
+ * gdbtypes.c (create_range_type): Dittol
+ (create_set_type): Ditto.
+ (check_typedef): Ditto.
+ * jv-typeprint.c (java_type_print_base): Ditto.
+ * p-typeprint.c (pascal_type_print_base): Ditto
+ * p-valprint.c (pascal_val_print): Ditto.
+ * stabsread.c (read_cfront_member_functions): Ditto.
+ (read_member_functions): Ditto.
+ (cleanup_undefined_types): Ditto.
+ * valprint.c (val_print): Ditto.
+
+ * valops.c (hand_function_call): Remove is_prototyped
+ variable and just use type flag test macro directly.
+
2001-12-11 Fred Fish <fnf@redhat.com>
* gdbtypes.c (print_bound_type): New function.
fprintf_filtered (stream, "{\n");
if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
{
- if (TYPE_FLAGS (type) & TYPE_FLAG_STUB)
+ if (TYPE_STUB (type))
fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
else
fprintfi_filtered (level + 4, stream, "<no data fields>\n");
fprintf_filtered (stream, "(\n");
if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
{
- if (TYPE_FLAGS (type) & TYPE_FLAG_STUB)
+ if (TYPE_STUB (type))
{
fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
}
case TYPE_CODE_SET:
elttype = TYPE_INDEX_TYPE (type);
CHECK_TYPEDEF (elttype);
- if (TYPE_FLAGS (elttype) & TYPE_FLAG_STUB)
+ if (TYPE_STUB (elttype))
{
fprintf_filtered (stream, "<incomplete type>");
gdb_flush (stream);
/* Is it a code address? */
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC
- || TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD ||
- (TYPE_FLAGS (TYPE_TARGET_TYPE (type)) & TYPE_FLAG_CODE_SPACE) != 0)
+ || TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD
+ || TYPE_CODE_SPACE (TYPE_TARGET_TYPE (type)))
return d10v_make_iaddr (addr);
else
return d10v_make_daddr (addr);
arg_types[iparams] = TYPE_FIELD_TYPE (die->type, iparams);
/* Set last entry in argument type vector. */
- if (TYPE_FLAGS (die->type) & TYPE_FLAG_VARARGS)
+ if (TYPE_VARARGS (die->type))
arg_types[nparams] = NULL;
else
arg_types[nparams] = dwarf2_fundamental_type (objfile, FT_VOID);
struct symbol *sym;
type = struct_type (dip, thisdie, enddie, objfile);
- if (!(TYPE_FLAGS (type) & TYPE_FLAG_STUB))
+ if (!TYPE_STUB (type))
{
sym = new_symbol (dip, objfile);
if (sym != NULL)
}
TYPE_CODE (result_type) = TYPE_CODE_RANGE;
TYPE_TARGET_TYPE (result_type) = index_type;
- if (TYPE_FLAGS (index_type) & TYPE_FLAG_STUB)
+ if (TYPE_STUB (index_type))
TYPE_FLAGS (result_type) |= TYPE_FLAG_TARGET_STUB;
else
TYPE_LENGTH (result_type) = TYPE_LENGTH (check_typedef (index_type));
TYPE_ALLOC (result_type, 1 * sizeof (struct field));
memset (TYPE_FIELDS (result_type), 0, sizeof (struct field));
- if (!(TYPE_FLAGS (domain_type) & TYPE_FLAG_STUB))
+ if (!TYPE_STUB (domain_type))
{
if (get_discrete_bounds (domain_type, &low_bound, &high_bound) < 0)
low_bound = high_bound = 0;
make_cv_type (is_const, is_volatile, newtype, &type);
}
/* Otherwise, rely on the stub flag being set for opaque/stubbed types */
- else if ((TYPE_FLAGS (type) & TYPE_FLAG_STUB) && !currently_reading_symtab)
+ else if (TYPE_STUB (type) && !currently_reading_symtab)
{
char *name = type_name_no_tag (type);
/* FIXME: shouldn't we separately check the TYPE_NAME and the
make_cv_type (is_const, is_volatile, SYMBOL_TYPE (sym), &type);
}
- if (TYPE_FLAGS (type) & TYPE_FLAG_TARGET_STUB)
+ if (TYPE_TARGET_STUB (type))
{
struct type *range_type;
struct type *target_type = check_typedef (TYPE_TARGET_TYPE (type));
- if (TYPE_FLAGS (target_type) & (TYPE_FLAG_STUB | TYPE_FLAG_TARGET_STUB))
+ if (TYPE_STUB (target_type) || TYPE_TARGET_STUB (target_type))
{
}
else if (TYPE_CODE (type) == TYPE_CODE_ARRAY
fprintf_filtered (stream, "{\n");
if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
{
- if (TYPE_FLAGS (type) & TYPE_FLAG_STUB)
+ if (TYPE_STUB (type))
fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
else
fprintfi_filtered (level + 4, stream, "<no data fields>\n");
fprintf_filtered (stream, "\n");
if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
{
- if (TYPE_FLAGS (type) & TYPE_FLAG_STUB)
+ if (TYPE_STUB (type))
fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
else
fprintfi_filtered (level + 4, stream, "<no data fields>\n");
case TYPE_CODE_SET:
elttype = TYPE_INDEX_TYPE (type);
CHECK_TYPEDEF (elttype);
- if (TYPE_FLAGS (elttype) & TYPE_FLAG_STUB)
+ if (TYPE_STUB (elttype))
{
fprintf_filtered (stream, "<incomplete type>");
gdb_flush (stream);
TYPE_CODE (new_sublist->fn_field.type) = TYPE_CODE_METHOD;
/* If this is just a stub, then we don't have the real name here. */
- if (TYPE_FLAGS (new_sublist->fn_field.type) & TYPE_FLAG_STUB)
+ if (TYPE_STUB (new_sublist->fn_field.type))
{
if (!TYPE_DOMAIN_TYPE (new_sublist->fn_field.type))
TYPE_DOMAIN_TYPE (new_sublist->fn_field.type) = type;
/* If this is just a stub, then we don't have the real name here. */
- if (TYPE_FLAGS (new_sublist->fn_field.type) & TYPE_FLAG_STUB)
+ if (TYPE_STUB (new_sublist->fn_field.type))
{
if (!TYPE_DOMAIN_TYPE (new_sublist->fn_field.type))
TYPE_DOMAIN_TYPE (new_sublist->fn_field.type) = type;
as well as in check_typedef to deal with the (legitimate in
C though not C++) case of several types with the same name
in different source files. */
- if (TYPE_FLAGS (*type) & TYPE_FLAG_STUB)
+ if (TYPE_STUB (*type))
{
struct pending *ppt;
int i;
else
{
- int is_prototyped = TYPE_FLAGS (ftype) & TYPE_FLAG_PROTOTYPED;
param_type = TYPE_FIELD_TYPE (ftype, i);
-
- args[i] = value_arg_coerce (args[i], param_type, is_prototyped);
+ args[i] = value_arg_coerce (args[i], param_type, TYPE_PROTOTYPED (ftype));
}
/*elz: this code is to handle the case in which the function to be called
only a stub and we can't find and substitute its complete type, then
print appropriate string and return. */
- if (TYPE_FLAGS (real_type) & TYPE_FLAG_STUB)
+ if (TYPE_STUB (real_type))
{
fprintf_filtered (stream, "<incomplete type>");
gdb_flush (stream);