struct type
{
+ /* Get the type code of this type.
+
+ Note that the code can be TYPE_CODE_TYPEDEF, so if you want the real
+ type, you need to do `check_typedef (type)->code ()`. */
+ type_code code () const
+ {
+ return this->main_type->code;
+ }
+
+ /* Set the type code of this type. */
+ void set_code (type_code code)
+ {
+ this->main_type->code = code;
+ }
+
/* * 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;
space in struct type. */
extern bool set_type_align (struct type *, ULONGEST);
-/* * Note that TYPE_CODE can be TYPE_CODE_TYPEDEF, so if you want the real
- type, you need to do TYPE_CODE (check_type (this_type)). */
-#define TYPE_CODE(thistype) TYPE_MAIN_TYPE(thistype)->code
+#define TYPE_CODE(thistype) ((thistype)->code ())
#define TYPE_NFIELDS(thistype) TYPE_MAIN_TYPE(thistype)->nfields
#define TYPE_FIELDS(thistype) TYPE_MAIN_TYPE(thistype)->flds_bnds.fields
((thistype)->dyn_prop (DYN_PROP_ASSOCIATED))
/* Attribute accessors for dynamic properties. */
-#define TYPE_DYN_PROP_LIST(thistype) \
- TYPE_MAIN_TYPE(thistype)->dyn_prop_list
#define TYPE_DYN_PROP_BATON(dynprop) \
dynprop->data.baton
#define TYPE_DYN_PROP_ADDR(dynprop) \