Commit 07a3462a by Jim Wilson Committed by Jim Wilson

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
parent 5ef17dd2
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> 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
* tinfo.h (old abi): #include "tconfig.h". * tinfo.h (old abi): #include "tconfig.h".
......
...@@ -118,7 +118,8 @@ static int avoid_overlap PARAMS ((tree, tree, int *)); ...@@ -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_field PARAMS ((tree, tree, int *, int *, unsigned int *));
static tree build_base_fields PARAMS ((tree, int *)); static tree build_base_fields PARAMS ((tree, int *));
static tree build_vbase_pointer_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 check_methods PARAMS ((tree));
static void remove_zero_width_bit_fields PARAMS ((tree)); static void remove_zero_width_bit_fields PARAMS ((tree));
static void check_bases PARAMS ((tree, int *, int *, int *)); static void check_bases PARAMS ((tree, int *, int *, int *));
...@@ -225,6 +226,7 @@ build_vbase_pointer_fields (rec, empty_p) ...@@ -225,6 +226,7 @@ build_vbase_pointer_fields (rec, empty_p)
get_identifier (VTABLE_BASE), get_identifier (VTABLE_BASE),
build_pointer_type (basetype), build_pointer_type (basetype),
rec, rec,
basetype,
empty_p); empty_p);
BINFO_VPTR_FIELD (base_binfo) = decl; BINFO_VPTR_FIELD (base_binfo) = decl;
TREE_CHAIN (decl) = vbase_decls; TREE_CHAIN (decl) = vbase_decls;
...@@ -3970,17 +3972,19 @@ check_field_decls (t, access_decls, empty_p, ...@@ -3970,17 +3972,19 @@ check_field_decls (t, access_decls, empty_p,
/* Return a FIELD_DECL for a pointer-to-virtual-table or /* Return a FIELD_DECL for a pointer-to-virtual-table or
pointer-to-virtual-base. The NAME, ASSEMBLER_NAME, and TYPE of the pointer-to-virtual-base. The NAME, ASSEMBLER_NAME, and TYPE of the
field are as indicated. The CLASS_TYPE in which this field occurs 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 function to indicate that a class containing this field is
non-empty. */ non-empty. */
static tree 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) empty_p)
tree name; tree name;
tree assembler_name; tree assembler_name;
tree type; tree type;
tree class_type; tree class_type;
tree fcontext;
int *empty_p; int *empty_p;
{ {
tree field; tree field;
...@@ -3995,7 +3999,7 @@ build_vtbl_or_vbase_field (name, assembler_name, type, class_type, ...@@ -3995,7 +3999,7 @@ build_vtbl_or_vbase_field (name, assembler_name, type, class_type,
DECL_ARTIFICIAL (field) = 1; DECL_ARTIFICIAL (field) = 1;
DECL_FIELD_CONTEXT (field) = class_type; DECL_FIELD_CONTEXT (field) = class_type;
DECL_CLASS_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_SAVED_INSNS (field) = 0;
DECL_FIELD_SIZE (field) = 0; DECL_FIELD_SIZE (field) = 0;
DECL_ALIGN (field) = TYPE_ALIGN (type); DECL_ALIGN (field) = TYPE_ALIGN (type);
...@@ -4381,6 +4385,7 @@ create_vtable_ptr (t, empty_p, has_virtual_p, ...@@ -4381,6 +4385,7 @@ create_vtable_ptr (t, empty_p, has_virtual_p,
get_identifier (VFIELD_BASE), get_identifier (VFIELD_BASE),
vtbl_ptr_type_node, vtbl_ptr_type_node,
t, t,
t,
empty_p); empty_p);
/* Add the new field to the list of fields in this class. */ /* Add the new field to the list of fields in this class. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment