* m2-typeprint.c (m2_print_type): Update.
* gdbtypes.c (recursive_dump_type): Update.
(copy_type_recursive): Update.
* c-typeprint.c (c_type_print_varspec_prefix): Update.
(c_type_print_base): Update.
* gdbtypes.h (TYPE_CODE_TEMPLATE, TYPE_CODE_TEMPLATE_ARG):
Remove.
(struct cplus_struct_type) <ntemplate_args>: Remove.
<struct template_arg>: Remove.
<is_dynamic>: Move earlier.
(TYPE_TEMPLATE_ARGS): Remove.
(TYPE_NTEMPLATE_ARGS): Remove.
(TYPE_TEMPLATE_ARG): Remove.
+2010-02-19 Tom Tromey <tromey@redhat.com>
+
+ * p-typeprint.c (pascal_type_print_varspec_prefix): Update.
+ * m2-typeprint.c (m2_print_type): Update.
+ * gdbtypes.c (recursive_dump_type): Update.
+ (copy_type_recursive): Update.
+ * c-typeprint.c (c_type_print_varspec_prefix): Update.
+ (c_type_print_base): Update.
+ * gdbtypes.h (TYPE_CODE_TEMPLATE, TYPE_CODE_TEMPLATE_ARG):
+ Remove.
+ (struct cplus_struct_type) <ntemplate_args>: Remove.
+ <struct template_arg>: Remove.
+ <is_dynamic>: Move earlier.
+ (TYPE_TEMPLATE_ARGS): Remove.
+ (TYPE_NTEMPLATE_ARGS): Remove.
+ (TYPE_TEMPLATE_ARG): Remove.
+
2010-02-19 Tom Tromey <tromey@redhat.com>
PR c++/8693, PR c++/9496:
case TYPE_CODE_STRING:
case TYPE_CODE_BITSTRING:
case TYPE_CODE_COMPLEX:
- case TYPE_CODE_TEMPLATE:
case TYPE_CODE_NAMESPACE:
case TYPE_CODE_DECFLOAT:
/* These types need no prefix. They are listed here so that
case TYPE_CODE_STRING:
case TYPE_CODE_BITSTRING:
case TYPE_CODE_COMPLEX:
- case TYPE_CODE_TEMPLATE:
case TYPE_CODE_NAMESPACE:
case TYPE_CODE_DECFLOAT:
/* These types do not need a suffix. They are listed so that
fprintf_filtered (stream, _("<range type>"));
break;
- case TYPE_CODE_TEMPLATE:
- /* Called on "ptype t" where "t" is a template.
- Prints the template header (with args), e.g.:
- template <class T1, class T2> class "
- and then merges with the struct/union/class code to
- print the rest of the definition. */
- c_type_print_modifier (type, stream, 0, 1);
- fprintf_filtered (stream, "template <");
- for (i = 0; i < TYPE_NTEMPLATE_ARGS (type); i++)
- {
- struct template_arg templ_arg;
- templ_arg = TYPE_TEMPLATE_ARG (type, i);
- fprintf_filtered (stream, "class %s", templ_arg.name);
- if (i < TYPE_NTEMPLATE_ARGS (type) - 1)
- fprintf_filtered (stream, ", ");
- }
- fprintf_filtered (stream, "> class ");
- goto struct_union;
-
case TYPE_CODE_NAMESPACE:
fputs_filtered ("namespace ", stream);
fputs_filtered (TYPE_TAG_NAME (type), stream);
case TYPE_CODE_TYPEDEF:
printf_filtered ("(TYPE_CODE_TYPEDEF)");
break;
- case TYPE_CODE_TEMPLATE:
- printf_filtered ("(TYPE_CODE_TEMPLATE)");
- break;
- case TYPE_CODE_TEMPLATE_ARG:
- printf_filtered ("(TYPE_CODE_TEMPLATE_ARG)");
- break;
case TYPE_CODE_NAMESPACE:
printf_filtered ("(TYPE_CODE_NAMESPACE)");
break;
TYPE_FLOATFORMAT (new_type) = TYPE_FLOATFORMAT (type);
else if (TYPE_CODE (type) == TYPE_CODE_STRUCT
|| TYPE_CODE (type) == TYPE_CODE_UNION
- || TYPE_CODE (type) == TYPE_CODE_TEMPLATE
|| TYPE_CODE (type) == TYPE_CODE_NAMESPACE)
INIT_CPLUS_SPECIFIC (new_type);
TYPE_CODE_COMPLEX, /* Complex float */
TYPE_CODE_TYPEDEF,
- TYPE_CODE_TEMPLATE, /* C++ template */
- TYPE_CODE_TEMPLATE_ARG, /* C++ template arg */
TYPE_CODE_NAMESPACE, /* C++ namespace. */
short nfn_fields_total;
- /* Number of template arguments, placed here for better struct
- packing. */
-
- short ntemplate_args;
+ /* One if this struct is a dynamic class, as defined by the
+ Itanium C++ ABI: if it requires a virtual table pointer,
+ because it or any of its base classes have one or more virtual
+ member functions or virtual base classes. Minus one if not
+ dynamic. Zero if not yet computed. */
+ int is_dynamic : 2;
/* For derived classes, the number of base classes is given by n_baseclasses
and virtual_field_bits is a bit vector containing one bit per base class.
}
*fn_fieldlists;
- /* If this "struct type" describes a template, then it
- * has arguments. "template_args" points to an array of
- * template arg descriptors, of length "ntemplate_args".
- * The only real information in each of these template arg descriptors
- * is a name. "type" will typically just point to a "struct type" with
- * the placeholder TYPE_CODE_TEMPLATE_ARG type.
- */
- struct template_arg
- {
- char *name;
- struct type *type;
- }
- *template_args;
-
/* Pointer to information about enclosing scope, if this is a
* local type. If it is not a local type, this is NULL
*/
int line;
}
*localtype_ptr;
-
- /* One if this struct is a dynamic class, as defined by the
- Itanium C++ ABI: if it requires a virtual table pointer,
- because it or any of its base classes have one or more virtual
- member functions or virtual base classes. Minus one if not
- dynamic. Zero if not yet computed. */
- int is_dynamic : 2;
};
/* Struct used in computing virtual base list */
#define TYPE_CODE(thistype) TYPE_MAIN_TYPE(thistype)->code
#define TYPE_NFIELDS(thistype) TYPE_MAIN_TYPE(thistype)->nfields
#define TYPE_FIELDS(thistype) TYPE_MAIN_TYPE(thistype)->flds_bnds.fields
-#define TYPE_TEMPLATE_ARGS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->template_args
#define TYPE_INDEX_TYPE(type) TYPE_FIELD_TYPE (type, 0)
#define TYPE_RANGE_DATA(thistype) TYPE_MAIN_TYPE(thistype)->flds_bnds.bounds
#define TYPE_FN_FIELDS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->fn_fields
#define TYPE_NFN_FIELDS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->nfn_fields
#define TYPE_NFN_FIELDS_TOTAL(thistype) TYPE_CPLUS_SPECIFIC(thistype)->nfn_fields_total
-#define TYPE_NTEMPLATE_ARGS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->ntemplate_args
#define TYPE_SPECIFIC_FIELD(thistype) \
TYPE_MAIN_TYPE(thistype)->type_specific_field
#define TYPE_TYPE_SPECIFIC(thistype) TYPE_MAIN_TYPE(thistype)->type_specific
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
#define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE(TYPE_FIELD(thistype,n))
#define TYPE_FIELD_PACKED(thistype, n) (FIELD_BITSIZE(TYPE_FIELD(thistype,n))!=0)
-#define TYPE_TEMPLATE_ARG(thistype, n) TYPE_CPLUS_SPECIFIC(thistype)->template_args[n]
#define TYPE_FIELD_PRIVATE_BITS(thistype) \
TYPE_CPLUS_SPECIFIC(thistype)->private_field_bits
m2_range (type, stream, show, level);
break;
- case TYPE_CODE_TEMPLATE:
- break;
-
default:
m2_type_name (type, stream);
break;
case TYPE_CODE_BITSTRING:
case TYPE_CODE_COMPLEX:
case TYPE_CODE_TYPEDEF:
- case TYPE_CODE_TEMPLATE:
/* These types need no prefix. They are listed here so that
gcc -Wall will reveal any types that haven't been handled. */
break;
case TYPE_CODE_BITSTRING:
case TYPE_CODE_COMPLEX:
case TYPE_CODE_TYPEDEF:
- case TYPE_CODE_TEMPLATE:
/* These types do not need a suffix. They are listed so that
gcc -Wall will report types that may not have been considered. */
break;