aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>2000-02-01 02:17:06 +0000
committerJim Wilson <wilson@gcc.gnu.org>2000-01-31 18:17:06 -0800
commit07a3462a53b230baae7bb0438cf276de28d2aedf (patch)
tree223d6b9b9355da4641f6cf8a9ed7c8628504c7a4
parent5ef17dd258db461da74077df59185cf314b8ccaf (diff)
downloadgcc-07a3462a53b230baae7bb0438cf276de28d2aedf.zip
gcc-07a3462a53b230baae7bb0438cf276de28d2aedf.tar.gz
gcc-07a3462a53b230baae7bb0438cf276de28d2aedf.tar.bz2
Fix gdb testsuite regressions.
* class.c (build_vtbl_or_vbase_field): New parameter fcontext. Store it in DECL_FCONTEXT. (build_vbase_pointer_fields, create_vtable_ptr): Fix callers. From-SVN: r31729
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/class.c13
2 files changed, 15 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 98e2b2f..da734e4 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
+
+ * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
+ Store it in DECL_FCONTEXT.
+ (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
+
2000-01-31 Jason Merrill <jason@casey.cygnus.com>
* tinfo.h (old abi): #include "tconfig.h".
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 40f8383..2d45510 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -118,7 +118,8 @@ static int avoid_overlap PARAMS ((tree, tree, int *));
static tree build_base_field PARAMS ((tree, tree, int *, int *, unsigned int *));
static tree build_base_fields PARAMS ((tree, int *));
static tree build_vbase_pointer_fields PARAMS ((tree, int *));
-static tree build_vtbl_or_vbase_field PARAMS ((tree, tree, tree, tree, int *));
+static tree build_vtbl_or_vbase_field PARAMS ((tree, tree, tree, tree, tree,
+ int *));
static void check_methods PARAMS ((tree));
static void remove_zero_width_bit_fields PARAMS ((tree));
static void check_bases PARAMS ((tree, int *, int *, int *));
@@ -225,6 +226,7 @@ build_vbase_pointer_fields (rec, empty_p)
get_identifier (VTABLE_BASE),
build_pointer_type (basetype),
rec,
+ basetype,
empty_p);
BINFO_VPTR_FIELD (base_binfo) = decl;
TREE_CHAIN (decl) = vbase_decls;
@@ -3970,17 +3972,19 @@ check_field_decls (t, access_decls, empty_p,
/* Return a FIELD_DECL for a pointer-to-virtual-table or
pointer-to-virtual-base. The NAME, ASSEMBLER_NAME, and TYPE of the
field are as indicated. The CLASS_TYPE in which this field occurs
- is also indicated. *EMPTY_P is set to a non-zero value by this
+ is also indicated. FCONTEXT is the type that is needed for the debug
+ info output routines. *EMPTY_P is set to a non-zero value by this
function to indicate that a class containing this field is
non-empty. */
static tree
-build_vtbl_or_vbase_field (name, assembler_name, type, class_type,
+build_vtbl_or_vbase_field (name, assembler_name, type, class_type, fcontext,
empty_p)
tree name;
tree assembler_name;
tree type;
tree class_type;
+ tree fcontext;
int *empty_p;
{
tree field;
@@ -3995,7 +3999,7 @@ build_vtbl_or_vbase_field (name, assembler_name, type, class_type,
DECL_ARTIFICIAL (field) = 1;
DECL_FIELD_CONTEXT (field) = class_type;
DECL_CLASS_CONTEXT (field) = class_type;
- DECL_FCONTEXT (field) = class_type;
+ DECL_FCONTEXT (field) = fcontext;
DECL_SAVED_INSNS (field) = 0;
DECL_FIELD_SIZE (field) = 0;
DECL_ALIGN (field) = TYPE_ALIGN (type);
@@ -4381,6 +4385,7 @@ create_vtable_ptr (t, empty_p, has_virtual_p,
get_identifier (VFIELD_BASE),
vtbl_ptr_type_node,
t,
+ t,
empty_p);
/* Add the new field to the list of fields in this class. */