summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-26 08:50:47 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-26 08:50:47 +0000
commit15acd583a2b048e2f2effa2d5abc89147b548712 (patch)
tree9d08f44db8af3837c38c8cf450cfa93527a04c85 /gcc
parent4960d87c6b07d9cac235efd3d429b5b8df15e1e8 (diff)
downloadgcc-15acd583a2b048e2f2effa2d5abc89147b548712.tar.gz
* cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
(CPTI_PTMD_DESC_TYPE): ... here. (ptmd_desc_type_node): Rename to ... (ptm_desc_type_node): ... here. * decl.c: Likewise. * rtti.c (ptmd_initializer): Rename to ... (ptm_initializer): ... here. (sythesize_tinfo_var): Adjust. Deal with pointer to member function. (create_tinfo_types): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34190 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog13
-rw-r--r--gcc/cp/cp-tree.h4
-rw-r--r--gcc/cp/decl.c2
-rw-r--r--gcc/cp/rtti.c36
4 files changed, 37 insertions, 18 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 33d02bed584..83224d8daf6 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,16 @@
+2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
+
+ * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
+ (CPTI_PTMD_DESC_TYPE): ... here.
+ (ptmd_desc_type_node): Rename to ...
+ (ptm_desc_type_node): ... here.
+ * decl.c: Likewise.
+ * rtti.c (ptmd_initializer): Rename to ...
+ (ptm_initializer): ... here.
+ (sythesize_tinfo_var): Adjust. Deal with pointer to member
+ function.
+ (create_tinfo_types): Adjust.
+
2000-05-25 Mark Mitchell <mark@codesourcery.com>
Finish implementation of VTTs.
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index d935c351c93..4f255a47881 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -541,7 +541,7 @@ enum cp_tree_index
CPTI_CLASS_DESC_TYPE,
CPTI_SI_CLASS_DESC_TYPE,
CPTI_VMI_CLASS_DESC_TYPE,
- CPTI_PTMD_DESC_TYPE,
+ CPTI_PTM_DESC_TYPE,
CPTI_BASE_DESC_TYPE,
CPTI_CLASS_TYPE,
@@ -634,7 +634,7 @@ extern tree cp_global_trees[CPTI_MAX];
#define class_desc_type_node cp_global_trees[CPTI_CLASS_DESC_TYPE]
#define si_class_desc_type_node cp_global_trees[CPTI_SI_CLASS_DESC_TYPE]
#define vmi_class_desc_type_node cp_global_trees[CPTI_VMI_CLASS_DESC_TYPE]
-#define ptmd_desc_type_node cp_global_trees[CPTI_PTMD_DESC_TYPE]
+#define ptm_desc_type_node cp_global_trees[CPTI_PTM_DESC_TYPE]
#define base_desc_type_node cp_global_trees[CPTI_BASE_DESC_TYPE]
#define class_type_node cp_global_trees[CPTI_CLASS_TYPE]
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 5704a172170..dc95473ec0c 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -210,7 +210,7 @@ tree error_mark_list;
tree bltn_desc_type_node, ptr_desc_type_node;
tree ary_desc_type_node, func_desc_type_node, enum_desc_type_node;
tree class_desc_type_node, si_class_desc_type_node, vmi_class_desc_type_node;
- tree ptmd_desc_type_node;
+ tree ptm_desc_type_node;
tree base_desc_type_node;
#if 0
Not needed yet? May be needed one day?
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index bde623f9eef..3b5f9c05c61 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -66,7 +66,7 @@ static int target_incomplete_p PARAMS((tree));
static tree tinfo_base_init PARAMS((tree, tree));
static tree generic_initializer PARAMS((tree, tree));
static tree ptr_initializer PARAMS((tree, tree, int *));
-static tree ptmd_initializer PARAMS((tree, tree, int *));
+static tree ptm_initializer PARAMS((tree, tree, int *));
static tree dfs_class_hint_mark PARAMS ((tree, void *));
static tree dfs_class_hint_unmark PARAMS ((tree, void *));
static int class_hint_flags PARAMS((tree));
@@ -1385,7 +1385,7 @@ ptr_initializer (desc, target, non_public_ptr)
base. */
static tree
-ptmd_initializer (desc, target, non_public_ptr)
+ptm_initializer (desc, target, non_public_ptr)
tree desc;
tree target;
int *non_public_ptr;
@@ -1528,8 +1528,8 @@ synthesize_tinfo_var (target_type, real_name)
case POINTER_TYPE:
if (TYPE_PTRMEM_P (target_type))
{
- var_type = ptmd_desc_type_node;
- var_init = ptmd_initializer (var_type, target_type, &non_public);
+ var_type = ptm_desc_type_node;
+ var_init = ptm_initializer (var_type, target_type, &non_public);
}
else
{
@@ -1561,7 +1561,12 @@ synthesize_tinfo_var (target_type, real_name)
break;
case UNION_TYPE:
case RECORD_TYPE:
- if (!COMPLETE_TYPE_P (target_type))
+ if (TYPE_PTRMEMFUNC_P (target_type))
+ {
+ var_type = ptm_desc_type_node;
+ var_init = ptm_initializer (var_type, target_type, &non_public);
+ }
+ else if (!COMPLETE_TYPE_P (target_type))
{
/* Emit a non-public class_type_info. */
non_public = 1;
@@ -1853,14 +1858,6 @@ create_tinfo_types ()
("__fundamental_type_info", 0,
NULL);
- /* Pointer type_info. Adds two fields, qualification mask
- and pointer to the pointed to type. */
- ptr_desc_type_node = create_pseudo_type_info
- ("__pointer_type_info", 0,
- build_decl (FIELD_DECL, NULL_TREE, integer_type_node),
- build_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
- NULL);
-
/* Array, function and enum type_info. No additional fields. */
ary_desc_type_node = create_pseudo_type_info
("__array_type_info", 0,
@@ -1900,10 +1897,19 @@ create_tinfo_types ()
/* General heirarchy is created as necessary in this vector. */
vmi_class_desc_type_node = make_tree_vec (10);
+ /* Pointer type_info. Adds two fields, qualification mask
+ and pointer to the pointed to type. This is really a descendant of
+ __pbase_type_info. */
+ ptr_desc_type_node = create_pseudo_type_info
+ ("__pointer_type_info", 0,
+ build_decl (FIELD_DECL, NULL_TREE, integer_type_node),
+ build_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
+ NULL);
+
/* Pointer to member data type_info. Add qualifications flags,
pointer to the member's type info and pointer to the class.
- This is really a descendant of __pointer_type_info. */
- ptmd_desc_type_node = create_pseudo_type_info
+ This is really a descendant of __pbase_type_info. */
+ ptm_desc_type_node = create_pseudo_type_info
("__pointer_to_member_type_info", 0,
build_decl (FIELD_DECL, NULL_TREE, integer_type_node),
build_decl (FIELD_DECL, NULL_TREE, ptr_type_info),