diff options
author | Tom Tromey <tromey@redhat.com> | 2010-02-19 22:22:49 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-02-19 22:22:49 +0000 |
commit | 48ea67a7550e2163a10272846816a02d06023308 (patch) | |
tree | 4a092870541d11423f8fb64cf71304588cbbc15d /gdb | |
parent | 48e32051ca17ba1cc1a2d5adc90ae5a63775e138 (diff) | |
download | gdb-48ea67a7550e2163a10272846816a02d06023308.zip gdb-48ea67a7550e2163a10272846816a02d06023308.tar.gz gdb-48ea67a7550e2163a10272846816a02d06023308.tar.bz2 |
* 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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 17 | ||||
-rw-r--r-- | gdb/c-typeprint.c | 21 | ||||
-rw-r--r-- | gdb/gdbtypes.c | 7 | ||||
-rw-r--r-- | gdb/gdbtypes.h | 36 | ||||
-rw-r--r-- | gdb/m2-typeprint.c | 3 | ||||
-rw-r--r-- | gdb/p-typeprint.c | 2 |
6 files changed, 23 insertions, 63 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8d222f5..af2a4fb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,22 @@ 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: * cp-namespace.c (cp_lookup_nested_type): Handle TYPE_CODE_UNION. * c-exp.y (lex_one_token): Rename from yylex. Don't call diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c index ed98381..3a0aa59 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -292,7 +292,6 @@ c_type_print_varspec_prefix (struct type *type, struct ui_file *stream, 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 @@ -616,7 +615,6 @@ c_type_print_varspec_suffix (struct type *type, struct ui_file *stream, 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 @@ -1100,25 +1098,6 @@ c_type_print_base (struct type *type, struct ui_file *stream, int show, 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); diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 46846c4..3269a8c 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -2755,12 +2755,6 @@ recursive_dump_type (struct type *type, int spaces) 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; @@ -3123,7 +3117,6 @@ copy_type_recursive (struct objfile *objfile, 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); diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 643fa03..2859ce9 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -131,8 +131,6 @@ enum type_code 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. */ @@ -685,10 +683,12 @@ struct cplus_struct_type 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. @@ -806,20 +806,6 @@ struct cplus_struct_type } *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 */ @@ -829,13 +815,6 @@ struct cplus_struct_type 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 */ @@ -909,7 +888,6 @@ extern void allocate_gnat_aux_type (struct type *); #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 @@ -941,7 +919,6 @@ extern void allocate_gnat_aux_type (struct type *); #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 @@ -1004,7 +981,6 @@ extern void allocate_gnat_aux_type (struct type *); #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 diff --git a/gdb/m2-typeprint.c b/gdb/m2-typeprint.c index 46a35bb..53e3ddc 100644 --- a/gdb/m2-typeprint.c +++ b/gdb/m2-typeprint.c @@ -146,9 +146,6 @@ m2_print_type (struct type *type, char *varstring, struct ui_file *stream, m2_range (type, stream, show, level); break; - case TYPE_CODE_TEMPLATE: - break; - default: m2_type_name (type, stream); break; diff --git a/gdb/p-typeprint.c b/gdb/p-typeprint.c index ef7f2ee..7ea1f12 100644 --- a/gdb/p-typeprint.c +++ b/gdb/p-typeprint.c @@ -289,7 +289,6 @@ pascal_type_print_varspec_prefix (struct type *type, struct ui_file *stream, 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; @@ -404,7 +403,6 @@ pascal_type_print_varspec_suffix (struct type *type, struct ui_file *stream, 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; |