summaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-12-14 20:33:29 +0000
committerTom Tromey <tromey@redhat.com>2012-12-14 20:33:29 +0000
commit7d27a96df4e297e7329e0e3856c6d6e346478c80 (patch)
tree577b811b54508d15105168636b95930d432a77da /gdb/gdbtypes.h
parentf8c05d0d192df972af6b1c14aaf9dc8743cfe72e (diff)
Partial fix for PR c++/14160:
* c-typeprint.c (c_type_print_base): Use TYPE_FN_FIELD_CONSTRUCTOR. * dwarf2read.c (dwarf2_is_constructor): New function. (dwarf2_add_member_fn): Use it. * gnu-v3-abi.c (gnuv3_pass_by_reference): Use TYPE_FN_FIELD_CONSTRUCTOR. * jv-typeprint.c (java_type_print_base): Use TYPE_FN_FIELD_CONSTRUCTOR. * gdbtypes.h (struct fn_field) <is_constructor>: New field. <dummy>: Shrink. (TYPE_FN_FIELD_CONSTRUCTOR): New macro. testsuite * gdb.cp/templates.exp (test_ptype_of_templates): Update kfails.
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r--gdb/gdbtypes.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index fb113d21b9..b2791cd867 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -837,8 +837,12 @@ struct cplus_struct_type
to reconstruct the rest of the fields). */
unsigned int is_stub:1;
+ /* True if this function is a constructor, false
+ otherwise. */
+ unsigned int is_constructor : 1;
+
/* Unused. */
- unsigned int dummy:4;
+ unsigned int dummy:3;
/* Index into that baseclass's virtual function table,
minus 2; else if static: VOFFSET_STATIC; else: 0. */
@@ -1212,6 +1216,7 @@ extern void allocate_gnat_aux_type (struct type *);
#define TYPE_FN_FIELD_ARTIFICIAL(thisfn, n) ((thisfn)[n].is_artificial)
#define TYPE_FN_FIELD_ABSTRACT(thisfn, n) ((thisfn)[n].is_abstract)
#define TYPE_FN_FIELD_STUB(thisfn, n) ((thisfn)[n].is_stub)
+#define TYPE_FN_FIELD_CONSTRUCTOR(thisfn, n) ((thisfn)[n].is_constructor)
#define TYPE_FN_FIELD_FCONTEXT(thisfn, n) ((thisfn)[n].fcontext)
#define TYPE_FN_FIELD_VOFFSET(thisfn, n) ((thisfn)[n].voffset-2)
#define TYPE_FN_FIELD_VIRTUAL_P(thisfn, n) ((thisfn)[n].voffset > 1)