Commit 7e2d2472 by Nathan Sidwell Committed by Nathan Sidwell

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
parent c42f056a
2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
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.
2000-04-08 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
......
......@@ -38,10 +38,10 @@ private:
type_info (const type_info&);
protected:
const char *_name;
const char *__name;
protected:
explicit type_info (const char *n): _name (n) { }
explicit type_info (const char *__n): __name (__n) { }
public:
// the public interface
......@@ -50,42 +50,43 @@ public:
// type. Uniqueness must use the _name value, not object address.
bool before (const type_info& arg) const;
const char* name () const
{ return _name; }
bool operator== (const type_info& arg) const;
bool operator!= (const type_info& arg) const
{ return !operator== (arg); }
{ return __name; }
bool operator== (const type_info& __arg) const;
bool operator!= (const type_info& __arg) const
{ return !operator== (__arg); }
#else
// In new abi we can rely on type_info's being unique,
// and therefore address comparisons are sufficient.
bool before (const type_info& arg) const
{ return this < &arg; }
bool before (const type_info& __arg) const
{ return this < &__arg; }
const char* name () const
{ return _name; }
bool operator== (const type_info& arg) const
{ return &arg == this; }
bool operator!= (const type_info& arg) const
{ return !operator== (arg); }
{ return __name; }
bool operator== (const type_info& __arg) const
{ return &__arg == this; }
bool operator!= (const type_info& __arg) const
{ return !operator== (__arg); }
#endif
// the internal interface
#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
public:
// return true if this is a pointer type of some kind
virtual bool is_pointer_p () const;
virtual bool __is_pointer_p () const;
// return true if this is a function type
virtual bool is_function_p () const;
virtual bool __is_function_p () const;
// Try and catch a thrown type. Store an adjusted pointer to the caught type
// in THR_OBJ. If THR_TYPE is not a pointer type, then THR_OBJ points to the
// thrown object. If THR_TYPE is a pointer type, then THR_OBJ is the pointer
// itself. OUTER indicates the number of outer pointers, and whether they
// were const qualified.
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;
// internally used during catch matching
virtual bool do_upcast (const __cxxabiv1::__class_type_info *target, void **obj_ptr) const;
virtual bool __do_upcast (const __cxxabiv1::__class_type_info *__target,
void **__obj_ptr) const;
#endif
};
......
......@@ -127,21 +127,21 @@ __pointer_to_member_type_info::
{}
bool __pointer_type_info::
is_pointer_p () const
__is_pointer_p () const
{
return true;
}
bool __function_type_info::
is_function_p () const
__is_function_p () const
{
return true;
}
bool __pointer_type_info::
do_catch (const type_info *thr_type,
void **thr_obj,
unsigned outer) const
__do_catch (const type_info *thr_type,
void **thr_obj,
unsigned outer) const
{
if (*this == *thr_type)
return true; // same type
......@@ -167,16 +167,16 @@ do_catch (const type_info *thr_type,
if (outer < 2 && *type == typeid (void))
{
// conversion to void
return !thrown_type->is_function_p ();
return !thrown_type->__is_function_p ();
}
return type->do_catch (thrown_type->type, thr_obj, outer + 2);
return type->__do_catch (thrown_type->type, thr_obj, outer + 2);
}
bool __pointer_to_member_type_info::
do_catch (const type_info *thr_type,
void **thr_obj,
unsigned outer) const
__do_catch (const type_info *thr_type,
void **thr_obj,
unsigned outer) const
{
if (*this == *thr_type)
return true; // same type
......@@ -202,7 +202,7 @@ do_catch (const type_info *thr_type,
if (*klass != *thrown_type->klass)
return false; // not pointers to member of same class
return type->do_catch (thrown_type->type, thr_obj, outer + 2);
return type->__do_catch (thrown_type->type, thr_obj, outer + 2);
}
} // namespace std
......@@ -338,7 +338,7 @@ __throw_type_match_rtti_2 (const void *catch_type_r, const void *throw_type_r,
#else
// new abi
return catch_type.do_catch (&throw_type, valp, 1);
return catch_type.__do_catch (&throw_type, valp, 1);
#endif
return 0;
}
......@@ -371,7 +371,7 @@ __is_pointer (void *p)
return pt != 0;
#else
// new abi
return t->is_pointer_p ();
return t->__is_pointer_p ();
#endif
}
......
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