diff options
author | Mark Mitchell <mark@codesourcery.com> | 2001-02-04 08:37:50 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2001-02-04 08:37:50 +0000 |
commit | 0f0b2faf47c360bc60e429fb7b558c25aabc99eb (patch) | |
tree | 7af25095acaf0a18ebaa6c173b4065e24a93b9a9 /libstdc++-v3/libsupc++/tinfo.cc | |
parent | 97458258b8e196f88ba17d4ed985aece3ec5675c (diff) | |
download | gcc-0f0b2faf47c360bc60e429fb7b558c25aabc99eb.tar.gz |
typeinfo (__GXX_MERGED_TYPEINFO_NAMES): New macro.
* libsupc++/typeinfo (__GXX_MERGED_TYPEINFO_NAMES): New macro.
* libsupc++/tinfo.cc (std::typeinfo::operator==): Use strcmp
whenever !__GXX_MERGED_TYPEINFO_NAMES.
* libsupc++/tinfo2.cc (std::typeinfo::before): Likewise.
From-SVN: r39438
Diffstat (limited to 'libstdc++-v3/libsupc++/tinfo.cc')
-rw-r--r-- | libstdc++-v3/libsupc++/tinfo.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libstdc++-v3/libsupc++/tinfo.cc b/libstdc++-v3/libsupc++/tinfo.cc index 523f5b8653c..fefc815e759 100644 --- a/libstdc++-v3/libsupc++/tinfo.cc +++ b/libstdc++-v3/libsupc++/tinfo.cc @@ -41,6 +41,17 @@ std::type_info:: ~type_info () { } +#if !__GXX_MERGED_TYPEINFO_NAMES + +// We can't rely on common symbols being shared between shared objects. +bool std::type_info:: +operator== (const std::type_info& arg) const +{ + return (&arg == this) || (__builtin_strcmp (name (), arg.name ()) == 0); +} + +#endif + #if !defined(__GXX_ABI_VERSION) || __GXX_ABI_VERSION < 100 // original (old) abi @@ -64,13 +75,6 @@ convert_to_base (void *addr, bool is_virtual, myint32 offset) } -// We can't rely on common symbols being shared between shared objects. -bool std::type_info:: -operator== (const std::type_info& arg) const -{ - return (&arg == this) || (__builtin_strcmp (name (), arg.name ()) == 0); -} - extern "C" void __rtti_class (void *addr, const char *name, const __class_type_info::base_info *bl, std::size_t bn) |