diff options
author | Tom Tromey <tromey@redhat.com> | 2010-02-02 16:47:13 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-02-02 16:47:13 +0000 |
commit | b641539397a6cb5b4c67dbedafab62b1ac21391e (patch) | |
tree | b71c0ac8b773776a5e386589e59765bd64168718 /gdb/gdbtypes.c | |
parent | 89bdb2450e85875b16ad73f00b5632f27e3054a1 (diff) | |
download | gdb-b641539397a6cb5b4c67dbedafab62b1ac21391e.tar.gz |
gdb
* m2-typeprint.c (m2_record_fields): Don't use
TYPE_DECLARED_TYPE.
* gdbtypes.h (TYPE_DECLARED_CLASS): New macro.
(struct main_type) <flag_declared_class>: New field.
(struct cplus_struct_type) <declared_type>: Remove.
<ntemplate_args>: Move earlier.
(DECLARED_TYPE_CLASS, DECLARED_TYPE_UNION, DECLARED_TYPE_STRUCT)
(DECLARED_TYPE_TEMPLATE): Remove.
(TYPE_DECLARED_TYPE): Remove.
* gdbtypes.c (lookup_union): Don't use TYPE_DECLARED_TYPE.
* dwarf2read.c (read_structure_type): Set TYPE_DECLARED_CLASS.
* c-typeprint.c (c_type_print_base): Use TYPE_DECLARED_CLASS, not
TYPE_DECLARED_TYPE.
gdb/testsuite
* gdb.dwarf2/member-ptr-forwardref.exp: Update expected result for
type-printing change.
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r-- | gdb/gdbtypes.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 2ff86471fe5..46846c42e9e 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -1132,13 +1132,6 @@ lookup_union (char *name, struct block *block) if (TYPE_CODE (t) == TYPE_CODE_UNION) return t; - /* C++ unions may come out with TYPE_CODE_CLASS, but we look at - * a further "declared_type" field to discover it is really a union. - */ - if (HAVE_CPLUS_STRUCT (t)) - if (TYPE_DECLARED_TYPE (t) == DECLARED_TYPE_UNION) - return t; - /* If we get here, it's not a union. */ error (_("This context has class, struct or enum %s, not a union."), name); |