+2020-09-14 Simon Marchi <simon.marchi@efficios.com>
+
+ * gdbtypes.h (struct type) <is_fixed_instance,
+ set_is_fixed_instance>: New methods.
+ (TYPE_FIXED_INSTANCE): Use type::is_fixed_instance, change all
+ write call sites to use type::set_is_fixed_instance.
+
2020-09-14 Simon Marchi <simon.marchi@efficios.com>
* gdbtypes.h (TYPE_GNU_IFUNC): Remove, replace all
(*elt_bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
}
- TYPE_FIXED_INSTANCE (new_type) = 1;
+ new_type->set_is_fixed_instance (true);
return new_type;
}
rtype->set_fields
((struct field *) TYPE_ZALLOC (rtype, nfields * sizeof (struct field)));
rtype->set_name (ada_type_name (type));
- TYPE_FIXED_INSTANCE (rtype) = 1;
+ rtype->set_is_fixed_instance (true);
off = 0;
bit_len = 0;
type->set_fields (fields);
type->set_name (ada_type_name (type0));
- TYPE_FIXED_INSTANCE (type) = 1;
+ type->set_is_fixed_instance (true);
TYPE_LENGTH (type) = 0;
}
type->field (f).set_type (new_type);
rtype->set_fields (fields);
rtype->set_name (ada_type_name (type));
- TYPE_FIXED_INSTANCE (rtype) = 1;
+ rtype->set_is_fixed_instance (true);
TYPE_LENGTH (rtype) = TYPE_LENGTH (type);
branch_type = to_fixed_variant_branch_type
}
else
{
- TYPE_FIXED_INSTANCE (type0) = 1;
+ type0->set_is_fixed_instance (true);
return type0;
}
TYPE_LENGTH (result)++;
}
- TYPE_FIXED_INSTANCE (result) = 1;
+ result->set_is_fixed_instance (true);
return result;
}
further interpretation. Optionally marks ordinary, fixed-size GDB
type. */
-#define TYPE_FIXED_INSTANCE(t) (TYPE_MAIN_TYPE (t)->flag_fixed_instance)
+#define TYPE_FIXED_INSTANCE(t) ((t)->is_fixed_instance ())
/* * Not textual. By default, GDB treats all single byte integers as
characters (or elements of strings) unless this flag is set. */
unsigned int m_flag_vector : 1;
unsigned int m_flag_stub_supported : 1;
unsigned int m_flag_gnu_ifunc : 1;
- unsigned int flag_fixed_instance : 1;
+ unsigned int m_flag_fixed_instance : 1;
unsigned int flag_objfile_owned : 1;
unsigned int flag_endianity_not_default : 1;
this->main_type->m_flag_gnu_ifunc = is_gnu_ifunc;
}
+ bool is_fixed_instance () const
+ {
+ return this->main_type->m_flag_fixed_instance;
+ }
+
+ void set_is_fixed_instance (bool is_fixed_instance)
+ {
+ this->main_type->m_flag_fixed_instance = is_fixed_instance;
+ }
+
/* * Return the dynamic property of the requested KIND from this type's
list of dynamic properties. */
dynamic_prop *dyn_prop (dynamic_prop_node_kind kind) const;