#define TYPE_FLAG_DATA_SPACE (1 << 10)
#define TYPE_DATA_SPACE(t) (TYPE_INSTANCE_FLAGS (t) & TYPE_FLAG_DATA_SPACE)
-/* FIXME: Kludge to mark a varargs function type for C++ member
- function argument processing. Currently only used in dwarf2read.c,
- but put it here so we won't accidentally overload the bit with
- another flag. */
+/* FIXME drow/2002-06-03: Only used for methods, but applies as well
+ to functions. */
#define TYPE_FLAG_VARARGS (1 << 11)
#define TYPE_VARARGS(t) (TYPE_FLAGS (t) & TYPE_FLAG_VARARGS)
For range types, there are two "fields",
the minimum and maximum values (both inclusive).
For enum types, each possible value is described by one "field".
- For a function type, a "field" for each parameter type.
+ For a function or method type, a "field" for each parameter.
For C++ classes, there is one field for each base class (if it is
a derived class) plus one field for each class data member. Member
functions are recorded elsewhere.
CORE_ADDR physaddr;
char *physname;
- /* For a function type, this is 1 if the argument is marked
+ /* For a function or member type, this is 1 if the argument is marked
artificial. Artificial arguments should not be shown to the
user. */
int artificial;
int bitsize;
/* In a struct or union type, type of this field.
- In a function type, type of this argument.
+ In a function or member type, type of this argument.
In an array type, the domain-type of the array. */
struct type *type;
/* Name of field, value or argument.
- NULL for range bounds and array domains. */
+ NULL for range bounds, array domains, and member function
+ arguments. */
char *name;
union type_specific
{
- /* ARG_TYPES is for TYPE_CODE_METHOD.
- Contains the type of each argument, ending with a void type
- after the last argument for normal member functions or a NULL
- pointer after the last argument for functions with variable
- arguments. */
-
- struct type **arg_types;
-
/* CPLUS_STUFF is for TYPE_CODE_STRUCT. It is initialized to point to
cplus_struct_default, a default static instance of a struct
cplus_struct_type. */
#define TYPE_NINSTANTIATIONS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->ninstantiations
#define TYPE_DECLARED_TYPE(thistype) TYPE_CPLUS_SPECIFIC(thistype)->declared_type
#define TYPE_TYPE_SPECIFIC(thistype) TYPE_MAIN_TYPE(thistype)->type_specific
-#define TYPE_ARG_TYPES(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.arg_types
#define TYPE_CPLUS_SPECIFIC(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.cplus_stuff
#define TYPE_FLOATFORMAT(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.floatformat
#define TYPE_BASECLASS(thistype,index) TYPE_MAIN_TYPE(thistype)->fields[index].type
#define TYPE_FN_FIELD(thisfn, n) (thisfn)[n]
#define TYPE_FN_FIELD_PHYSNAME(thisfn, n) (thisfn)[n].physname
#define TYPE_FN_FIELD_TYPE(thisfn, n) (thisfn)[n].type
-#define TYPE_FN_FIELD_ARGS(thisfn, n) TYPE_ARG_TYPES ((thisfn)[n].type)
+#define TYPE_FN_FIELD_ARGS(thisfn, n) TYPE_FIELDS ((thisfn)[n].type)
#define TYPE_FN_FIELD_CONST(thisfn, n) ((thisfn)[n].is_const)
#define TYPE_FN_FIELD_VOLATILE(thisfn, n) ((thisfn)[n].is_volatile)
#define TYPE_FN_FIELD_PRIVATE(thisfn, n) ((thisfn)[n].is_private)
/* Type for 128 bit vectors. */
extern struct type *builtin_type_vec128;
+extern struct type *builtin_type_vec128i;
/* Explicit floating-point formats. See "floatformat.h". */
extern struct type *builtin_type_ieee_single_big;
extern struct type *lookup_member_type (struct type *, struct type *);
extern void
-smash_to_method_type (struct type *, struct type *, struct type *,
- struct type **);
+smash_to_method_type (struct type *type, struct type *domain,
+ struct type *to_type, struct field *args,
+ int nargs, int varargs);
extern void
smash_to_member_type (struct type *, struct type *, struct type *);