aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/rtti.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2000-04-10 16:21:28 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2000-04-10 16:21:28 +0000
commit6d61f400fd019ac06026d7aaa412e076096a7d37 (patch)
tree3768b8d8cee3530ee2196a4ce4071d1941cdee6e /gcc/cp/rtti.c
parent4b7ee6157ab47830d9b198c2f968dbef9388e768 (diff)
downloadgcc-6d61f400fd019ac06026d7aaa412e076096a7d37.zip
gcc-6d61f400fd019ac06026d7aaa412e076096a7d37.tar.gz
gcc-6d61f400fd019ac06026d7aaa412e076096a7d37.tar.bz2
cxxabi.h (__pointer_type_info): Add restrict and incomplete flags.
* inc/cxxabi.h (__pointer_type_info): Add restrict and incomplete flags. (__pointer_type_info::__pointer_catch): New virtual function. (__pointer_to_member_type_info): Derive from __pointer_type_info. Adjust. (__pointer_to_member_type_info::__do_catch): Remove. (__pointer_to_member_type_info::__is_pointer_p): Declare. (__pointer_to_member_type_info::__pointer_catch): Declare. * rtti.c (qualifier_flags): Add restrict flag. (ptmd_initializer): Reorder members. (create_tinfo_types): Expand comments. Reorder ptmd_desc_type_node members. * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p): Implement. (__pointer_type_info::__do_catch): Move specific code into __pointer_catch. Call it. (__pointer_type_info::__pointer_catch): Non-pointer-to-member specific catch checking. Fix void conversion check. (__pointer_to_member_type_info::__do_catch): Remove. (__pointer_to_member_type_info::__pointer_catch): Implement. From-SVN: r33061
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r--gcc/cp/rtti.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 3a0a484..029d4d8 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -1286,6 +1286,8 @@ qualifier_flags (type)
flags |= 1;
if (quals & TYPE_QUAL_VOLATILE)
flags |= 2;
+ if (quals & TYPE_QUAL_RESTRICT)
+ flags |= 4;
return flags;
}
@@ -1369,14 +1371,14 @@ ptmd_initializer (desc, target)
tree klass = TYPE_PTRMEM_CLASS_TYPE (target);
int flags = qualifier_flags (to);
- init = tree_cons (NULL_TREE,
- build_unary_op (ADDR_EXPR, get_tinfo_decl (klass), 0),
- init);
+ init = tree_cons (NULL_TREE, build_int_2 (flags, 0), init);
init = tree_cons (NULL_TREE,
build_unary_op (ADDR_EXPR,
get_tinfo_decl (TYPE_MAIN_VARIANT (to)), 0),
init);
- init = tree_cons (NULL_TREE, build_int_2 (flags, 0), init);
+ init = tree_cons (NULL_TREE,
+ build_unary_op (ADDR_EXPR, get_tinfo_decl (klass), 0),
+ init);
init = build (CONSTRUCTOR, NULL_TREE, NULL_TREE, nreverse (init));
TREE_HAS_CONSTRUCTOR (init) = TREE_CONSTANT (init) = TREE_STATIC (init) = 1;
@@ -1821,7 +1823,8 @@ create_tinfo_types ()
("__class_type_info", 0,
NULL);
- /* Single public non-virtual base class. Add pointer to base class. */
+ /* Single public non-virtual base class. Add pointer to base class.
+ This is really a descendant of __class_type_info. */
si_class_desc_type_node = create_pseudo_type_info
("__si_class_type_info", 0,
build_lang_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
@@ -1843,13 +1846,14 @@ create_tinfo_types ()
/* General heirarchy is created as necessary in this vector. */
vmi_class_desc_type_node = make_tree_vec (10);
- /* Pointer to member data type_info. Add pointer to the class, pointer
- to the member's type info and qualifications flags. */
+ /* 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
("__pointer_to_member_type_info", 0,
+ build_lang_decl (FIELD_DECL, NULL_TREE, integer_type_node),
build_lang_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
build_lang_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
- build_lang_decl (FIELD_DECL, NULL_TREE, integer_type_node),
NULL);
pop_nested_namespace (abi_node);