diff options
author | Mark Mitchell <mark@codesourcery.com> | 2001-02-04 08:37:50 +0000 |
---|---|---|
committer | Mark Mitchell <mark@codesourcery.com> | 2001-02-04 08:37:50 +0000 |
commit | 0f5cd21df689cc5b7795fa490b9f4b038e9fe011 (patch) | |
tree | 7af25095acaf0a18ebaa6c173b4065e24a93b9a9 /libstdc++-v3/libsupc++/tinfo2.cc | |
parent | d0c3e149828715c03c76d5d7dcc46d44da427a11 (diff) |
* 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.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@39438 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/libsupc++/tinfo2.cc')
-rw-r--r-- | libstdc++-v3/libsupc++/tinfo2.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libstdc++-v3/libsupc++/tinfo2.cc b/libstdc++-v3/libsupc++/tinfo2.cc index bbcbda79dc5..53e0fdf2784 100644 --- a/libstdc++-v3/libsupc++/tinfo2.cc +++ b/libstdc++-v3/libsupc++/tinfo2.cc @@ -1,5 +1,5 @@ // Methods for type_info for -*- C++ -*- Run Time Type Identification. -// Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000 Free Software Foundation +// Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation // This file is part of GNU CC. @@ -36,13 +36,18 @@ extern "C" void abort (); using std::type_info; -#if !defined(__GXX_ABI_VERSION) || __GXX_ABI_VERSION < 100 +#if !__GXX_MERGED_TYPEINFO_NAMES + bool type_info::before (const type_info &arg) const { return __builtin_strcmp (name (), arg.name ()) < 0; } +#endif + +#if !defined(__GXX_ABI_VERSION) || __GXX_ABI_VERSION < 100 + // type info for pointer type. struct __pointer_type_info : public type_info { |