aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/inc/cxxabi.h
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2000-04-09 15:59:16 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2000-04-09 15:59:16 +0000
commit7e2d247261b874a7cf47f0b91b548a46107b6b44 (patch)
tree5bc6e63c7f5748ffa81c8b2fdfef88f166f80269 /gcc/cp/inc/cxxabi.h
parentc42f056abe054deb0044688a6b9e82627c2253e2 (diff)
downloadgcc-7e2d247261b874a7cf47f0b91b548a46107b6b44.zip
gcc-7e2d247261b874a7cf47f0b91b548a46107b6b44.tar.gz
gcc-7e2d247261b874a7cf47f0b91b548a46107b6b44.tar.bz2
Prepend __ to implementation defined names.
* inc/typeinfo (type_info): Rename _name to __name. (type_info::type_info): Rename parameter. (type_info::operator==, type_info::operator!=, type_info::before): Likewise. (type_info::is_pointer_p, type_info::is_function_p, type_info::do_catch, type_info::do_upcast): Prepend __. Rename parameters. * inc/cxxabi.h (__fundamental_type_info::__fundamental_type_info) Rename parameters. (__pointer_type_info::__pointer_type_info): Likewise. (__pointer_type_info::is_pointer_p, __pointer_type_info::do_catch): Prepend __. Rename parameters. (__array_type_info::__array_type_info): Rename parameters. (__function_type_info::__function_type_info): Likewise. (__function_type_info::is_function_p): Prepend __. (__enum_type_info::__enum_type_info): Rename parameters. (__pointer_to_member_type_info::__pointer_to_member_type_info): Likewise. (__pointer_to_member_type_info::do_catch): Prepend __. Rename parameters. (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __. (__class_type_info::__class_type_info): Rename parameters. (__class_type_info::sub_kind): Prepend __. Adjust member names. (__class_type_info::upcast_result, __class_type_info::dyncast_result): Prepend __. Move definition into tinfo.cc. (__class_type_info::do_upcast, __class_type_info::do_catch, __class_type_info::find_public_src, __class_type_info::do_dyncast, __class_type_info::do_find_public_src): Prepend __. Rename parameters. (__si_class_type_info::__si_class_type_info): Rename parameters. (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast, __si_class_type_info::do_find_public_src): Prepent __. Rename parameters. (__vmi_class_type_info::__vmi_class_type_info): Rename parameters. (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast, __vmi_class_type_info::do_find_public_src): Prepent __. Rename parameters. (__dynamic_cast): Rename parameters. * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p, type_info::do_catch, type_info::do_upcast): Prepend __. (contained_p, public_p, virtual_p, contained_public_p, contained_nonpublic_p, contained_nonvirtual_p): Adjust. (__class_type_info::do_catch, __class_type_info::do_upcast): Prepend __. Adjust. (__class_type_info::__upcast_result, __class_type_info::__dyncast_result): Move from inc/cxxabi.h. Adjust. (__class_type_info::find_public_src): Prepend __. Adjust. (__class_type_info::do_find_public_src, __si_class_type_info::do_find_public_src, __vmi_class_type_info::do_find_public_src): Likewise. (__class_type_info::do_dyncast, __si_class_type_info::do_dyncast, __vmi_class_type_info::do_dyncast): Likewise. (__class_type_info::do_upcast, __si_class_type_info::do_upcast, __vmi_class_type_info::do_upcast): Likewise. (__dynamic_cast): Adjust. * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __. (__function_type_info::is_function_p): Likewise. (__pointer_type_info::do_catch): Likewise. Adjust. (__pointer_to_member_type_info::do_catch): Likewise. Adjust. (__throw_type_match_rtti_2): Adjust. (__is_pointer): Adjust. From-SVN: r33041
Diffstat (limited to 'gcc/cp/inc/cxxabi.h')
-rw-r--r--gcc/cp/inc/cxxabi.h221
1 files changed, 104 insertions, 117 deletions
diff --git a/gcc/cp/inc/cxxabi.h b/gcc/cp/inc/cxxabi.h
index e0c1531..66a6607 100644
--- a/gcc/cp/inc/cxxabi.h
+++ b/gcc/cp/inc/cxxabi.h
@@ -36,8 +36,8 @@ class __fundamental_type_info
public:
virtual ~__fundamental_type_info ();
public:
- explicit __fundamental_type_info (const char *n_)
- : std::type_info (n_)
+ explicit __fundamental_type_info (const char *__n)
+ : std::type_info (__n)
{ }
};
@@ -54,10 +54,10 @@ public:
public:
virtual ~__pointer_type_info ();
public:
- explicit __pointer_type_info (const char *n_,
- int quals_,
- const std::type_info *type_)
- : std::type_info (n_), quals (quals_), type (type_)
+ explicit __pointer_type_info (const char *__n,
+ int __quals,
+ const std::type_info *__type)
+ : std::type_info (__n), quals (__quals), type (__type)
{ }
/* implementation defined types */
@@ -69,10 +69,10 @@ public:
/* implementation defined member functions */
protected:
- virtual bool is_pointer_p () const;
+ virtual bool __is_pointer_p () const;
protected:
- virtual bool do_catch (const std::type_info *thr_type, void **thr_obj,
- unsigned outer) const;
+ virtual bool __do_catch (const std::type_info *__thr_type, void **__thr_obj,
+ unsigned __outer) const;
};
/* type information for array objects */
@@ -83,8 +83,8 @@ class __array_type_info
protected:
virtual ~__array_type_info ();
public:
- explicit __array_type_info (const char *n_)
- : std::type_info (n_)
+ explicit __array_type_info (const char *__n)
+ : std::type_info (__n)
{ }
};
@@ -96,13 +96,13 @@ class __function_type_info
public:
virtual ~__function_type_info ();
public:
- explicit __function_type_info (const char *n_)
- : std::type_info (n_)
+ explicit __function_type_info (const char *__n)
+ : std::type_info (__n)
{ }
/* implementation defined member functions */
protected:
- virtual bool is_function_p () const;
+ virtual bool __is_function_p () const;
};
/* type information for enumerations */
@@ -113,8 +113,8 @@ class __enum_type_info
public:
virtual ~__enum_type_info ();
public:
- explicit __enum_type_info (const char *n_)
- : std::type_info (n_)
+ explicit __enum_type_info (const char *__n)
+ : std::type_info (__n)
{ }
};
@@ -132,11 +132,11 @@ public:
public:
virtual ~__pointer_to_member_type_info ();
public:
- explicit __pointer_to_member_type_info (const char *n_,
- const __class_type_info *klass_,
- const std::type_info *type_,
- int quals_)
- : std::type_info (n_), klass (klass_), type (type_), quals (quals_)
+ explicit __pointer_to_member_type_info (const char *__n,
+ const __class_type_info *__klass,
+ const std::type_info *__type,
+ int __quals)
+ : std::type_info (__n), klass (__klass), type (__type), quals (__quals)
{ }
/* implementation defined types */
@@ -148,8 +148,8 @@ public:
/* implementation defined member functions */
protected:
- virtual bool do_catch (const std::type_info *thr_type, void **thr_obj,
- unsigned outer) const;
+ virtual bool __do_catch (const std::type_info *__thr_type, void **__thr_obj,
+ unsigned __outer) const;
};
class __class_type_info;
@@ -173,11 +173,11 @@ public:
/* implementation defined member functions */
public:
- bool is_virtual_p () const
+ bool __is_virtual_p () const
{ return vmi_offset_flags & virtual_mask; }
- bool is_public_p () const
+ bool __is_public_p () const
{ return vmi_offset_flags & public_mask; }
- std::ptrdiff_t offset () const
+ std::ptrdiff_t __offset () const
{ return std::ptrdiff_t (vmi_offset_flags) >> offset_shift; }
};
@@ -189,8 +189,8 @@ class __class_type_info
public:
virtual ~__class_type_info ();
public:
- explicit __class_type_info (const char *n_)
- : type_info (n_)
+ explicit __class_type_info (const char *__n)
+ : type_info (__n)
{ }
/* implementation defined types */
@@ -198,71 +198,43 @@ public:
/* sub_kind tells us about how a base object is contained within a derived
object. We often do this lazily, hence the UNKNOWN value. At other times
we may use NOT_CONTAINED to mean not publicly contained. */
- enum sub_kind
+ enum __sub_kind
{
- unknown = 0, /* we have no idea */
- not_contained, /* not contained within us (in some */
- /* circumstances this might mean not contained */
- /* publicly) */
- contained_ambig, /* contained ambiguously */
+ __unknown = 0, /* we have no idea */
+ __not_contained, /* not contained within us (in some */
+ /* circumstances this might mean not contained */
+ /* publicly) */
+ __contained_ambig, /* contained ambiguously */
- contained_virtual_mask = __base_class_info::virtual_mask, /* via a virtual path */
- contained_public_mask = __base_class_info::public_mask, /* via a public path */
- contained_mask = 1 << __base_class_info::hwm_bit, /* contained within us */
+ __contained_virtual_mask = __base_class_info::virtual_mask, /* via a virtual path */
+ __contained_public_mask = __base_class_info::public_mask, /* via a public path */
+ __contained_mask = 1 << __base_class_info::hwm_bit, /* contained within us */
- contained_private = contained_mask,
- contained_public = contained_mask | contained_public_mask
+ __contained_private = __contained_mask,
+ __contained_public = __contained_mask | __contained_public_mask
};
public:
- struct upcast_result
- {
- const void *dst_ptr; /* pointer to caught object */
- sub_kind whole2dst; /* path from most derived object to target */
- int src_details; /* hints about the source type heirarchy */
- const __class_type_info *base_type; /* where we found the target, */
- /* if in vbase the __class_type_info of vbase */
- /* if a non-virtual base then 1 */
- /* else NULL */
- public:
- upcast_result (int d)
- :dst_ptr (NULL), whole2dst (unknown), src_details (d), base_type (NULL)
- {}
- };
-
-public:
- /* dyncast_result is used to hold information during traversal of a class
- heirarchy when dynamic casting. */
- struct dyncast_result
- {
- const void *dst_ptr; /* pointer to target object or NULL */
- sub_kind whole2dst; /* path from most derived object to target */
- sub_kind whole2src; /* path from most derived object to sub object */
- sub_kind dst2src; /* path from target to sub object */
-
- public:
- dyncast_result ()
- :dst_ptr (NULL), whole2dst (unknown),
- whole2src (unknown), dst2src (unknown)
- {}
- };
+ struct __upcast_result;
+ struct __dyncast_result;
/* implementation defined member functions */
protected:
- virtual bool do_upcast (const __class_type_info *dst_type, void **obj_ptr) const;
+ virtual bool __do_upcast (const __class_type_info *__dst_type, void **__obj_ptr) const;
protected:
- virtual bool do_catch (const type_info *thr_type, void **thr_obj,
- unsigned outer) const;
+ virtual bool __do_catch (const type_info *__thr_type, void **__thr_obj,
+ unsigned __outer) const;
public:
/* Helper for upcast. See if DST is us, or one of our bases. ACCESS_PATH */
/* gives the access from the start object. Return TRUE if we know the upcast */
/* fails. */
- virtual bool do_upcast (sub_kind access_path,
- const __class_type_info *dst, const void *obj,
- upcast_result &__restrict result) const;
+ virtual bool __do_upcast (__sub_kind __access_path,
+ const __class_type_info *__dst,
+ const void *__obj,
+ __upcast_result &__restrict __result) const;
public:
/* Indicate whether SRC_PTR of type SRC_TYPE is contained publicly within
@@ -271,9 +243,10 @@ public:
within this type. If SRC_PTR is one of our SRC_TYPE bases, indicate the
virtuality. Returns not_contained for non containment or private
containment. */
- inline sub_kind find_public_src (std::ptrdiff_t src2dst, const void *obj_ptr,
- const __class_type_info *src_type,
- const void *src_ptr) const;
+ inline __sub_kind __find_public_src (std::ptrdiff_t __src2dst,
+ const void *__obj_ptr,
+ const __class_type_info *__src_type,
+ const void *__src_ptr) const;
public:
/* dynamic cast helper. ACCESS_PATH gives the access from the most derived
@@ -282,18 +255,22 @@ public:
indicates the static type started from and SRC_PTR points to that base
within the most derived object. Fill in RESULT with what we find. Return
true if we have located an ambiguous match. */
- virtual bool do_dyncast (std::ptrdiff_t src2dst, sub_kind access_path,
- const __class_type_info *dst_type, const void *obj_ptr,
- const __class_type_info *src_type, const void *src_ptr,
- dyncast_result &result) const;
+ virtual bool __do_dyncast (std::ptrdiff_t __src2dst,
+ __sub_kind __access_path,
+ const __class_type_info *__dst_type,
+ const void *__obj_ptr,
+ const __class_type_info *__src_type,
+ const void *__src_ptr,
+ __dyncast_result &__result) const;
public:
/* Helper for find_public_subobj. SRC2DST indicates how SRC_TYPE bases are
inherited by the type started from -- which is not necessarily the
current type. The current type will be a base of the destination type.
OBJ_PTR points to the current base. */
- virtual sub_kind do_find_public_src (std::ptrdiff_t src2dst, const void *obj_ptr,
- const __class_type_info *src_type,
- const void *src_ptr) const;
+ virtual __sub_kind __do_find_public_src (std::ptrdiff_t __src2dst,
+ const void *__obj_ptr,
+ const __class_type_info *__src_type,
+ const void *__src_ptr) const;
};
/* type information for a class with a single non-virtual base */
@@ -308,23 +285,28 @@ protected:
public:
virtual ~__si_class_type_info ();
public:
- explicit __si_class_type_info (const char *n_,
- const __class_type_info *base_)
- : __class_type_info (n_), base (base_)
+ explicit __si_class_type_info (const char *__n,
+ const __class_type_info *__base)
+ : __class_type_info (__n), base (__base)
{ }
/* implementation defined member functions */
protected:
- virtual bool do_dyncast (std::ptrdiff_t src2dst, sub_kind access_path,
- const __class_type_info *dst_type, const void *obj_ptr,
- const __class_type_info *src_type, const void *src_ptr,
- dyncast_result &result) const;
- virtual sub_kind do_find_public_src (std::ptrdiff_t src2dst, const void *obj_ptr,
- const __class_type_info *src_type,
- const void *sub_ptr) const;
- virtual bool do_upcast (sub_kind access_path,
- const __class_type_info *dst, const void *obj,
- upcast_result &__restrict result) const;
+ virtual bool __do_dyncast (std::ptrdiff_t __src2dst,
+ __sub_kind __access_path,
+ const __class_type_info *__dst_type,
+ const void *__obj_ptr,
+ const __class_type_info *__src_type,
+ const void *__src_ptr,
+ __dyncast_result &__result) const;
+ virtual __sub_kind __do_find_public_src (std::ptrdiff_t __src2dst,
+ const void *__obj_ptr,
+ const __class_type_info *__src_type,
+ const void *__sub_ptr) const;
+ virtual bool __do_upcast (__sub_kind __access_path,
+ const __class_type_info *__dst,
+ const void *__obj,
+ __upcast_result &__restrict __result) const;
};
/* type information for a class with multiple and/or virtual bases */
@@ -342,9 +324,9 @@ public:
public:
virtual ~__vmi_class_type_info ();
public:
- explicit __vmi_class_type_info (const char *n_,
- int flags_)
- : __class_type_info (n_), vmi_flags (flags_), vmi_base_count (0)
+ explicit __vmi_class_type_info (const char *__n,
+ int __flags)
+ : __class_type_info (__n), vmi_flags (__flags), vmi_base_count (0)
{ }
/* implementation defined types */
@@ -355,28 +337,33 @@ public:
non_public_base_mask = 0x4, /* has non-public direct or indirect base */
public_base_mask = 0x8, /* has public base (direct) */
- flags_unknown_mask = 0x10
+ __flags_unknown_mask = 0x10
};
/* implementation defined member functions */
protected:
- virtual bool do_dyncast (std::ptrdiff_t src2dst, sub_kind access_path,
- const __class_type_info *dst_type, const void *obj_ptr,
- const __class_type_info *src_type, const void *src_ptr,
- dyncast_result &result) const;
- virtual sub_kind do_find_public_src (std::ptrdiff_t src2dst, const void *obj_ptr,
- const __class_type_info *src_type,
- const void *src_ptr) const;
- virtual bool do_upcast (sub_kind access_path,
- const __class_type_info *dst, const void *obj,
- upcast_result &__restrict result) const;
+ virtual bool __do_dyncast (std::ptrdiff_t __src2dst,
+ __sub_kind __access_path,
+ const __class_type_info *__dst_type,
+ const void *__obj_ptr,
+ const __class_type_info *__src_type,
+ const void *__src_ptr,
+ __dyncast_result &__result) const;
+ virtual __sub_kind __do_find_public_src (std::ptrdiff_t __src2dst,
+ const void *__obj_ptr,
+ const __class_type_info *__src_type,
+ const void *__src_ptr) const;
+ virtual bool __do_upcast (__sub_kind __access_path,
+ const __class_type_info *__dst,
+ const void *__obj,
+ __upcast_result &__restrict __result) const;
};
/* dynamic cast runtime */
-void *__dynamic_cast (const void *src_ptr, /* object started from */
- const __class_type_info *src_type, /* static type of object */
- const __class_type_info *dst_type, /* desired target type */
- std::ptrdiff_t src2dst); /* how src and dst are related */
+void *__dynamic_cast (const void *__src_ptr, /* object started from */
+ const __class_type_info *__src_type, /* static type of object */
+ const __class_type_info *__dst_type, /* desired target type */
+ std::ptrdiff_t __src2dst); /* how src and dst are related */
/* src2dst has the following possible values
>= 0: src_type is a unique public non-virtual base of dst_type