OSDN Git Service

* Makefile.tpl (BUILD_CONFIGDIRS): Remove
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / libsupc++ / tinfo2.cc
index a29d1d3..2f5a2cd 100644 (file)
@@ -1,24 +1,24 @@
 // Methods for type_info for -*- C++ -*- Run Time Type Identification.
 
-// Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2001 
+// Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2002
 // Free Software Foundation
 //
-// This file is part of GNU CC.
+// This file is part of GCC.
 //
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation; either version 2, or (at your option)
 // any later version.
 
-// GNU CC is distributed in the hope that it will be useful,
+// GCC is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
 
 // You should have received a copy of the GNU General Public License
-// along with GNU CC; see the file COPYING.  If not, write to
-// the Free Software Foundation, 59 Temple Place - Suite 330,
-// Boston, MA 02111-1307, USA. 
+// along with GCC; see the file COPYING.  If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA. 
 
 // As a special exception, you may use this file as part of a free software
 // library without restriction.  Specifically, if other files instantiate
@@ -116,11 +116,11 @@ __do_catch (const type_info *thr_type,
   const __pbase_type_info *thrown_type =
     static_cast <const __pbase_type_info *> (thr_type);
   
-  if (thrown_type->__qualifier_flags & ~__qualifier_flags)
+  if (thrown_type->__flags & ~__flags)
     // We're less qualified.
     return false;
   
-  if (!(__qualifier_flags & __const_mask))
+  if (!(__flags & __const_mask))
     outer &= ~1;
   
   return __pointer_catch (thrown_type, thr_obj, outer);
@@ -158,38 +158,10 @@ __pointer_catch (const __pbase_type_info *thr_type,
   const __pointer_to_member_type_info *thrown_type =
     static_cast <const __pointer_to_member_type_info *> (thr_type);
   
-  if (*__context_class != *thrown_type->__context_class)
+  if (*__context != *thrown_type->__context)
     return false;     // not pointers to member of same class
   
   return __pbase_type_info::__pointer_catch (thrown_type, thr_obj, outer);
 }
 
 } // namespace std
-
-// Entry points for the compiler.
-
-/* Low level match routine used by compiler to match types of catch
-   variables and thrown objects.  */
-
-extern "C" int
-__throw_type_match_rtti_2 (const void *catch_type_r, const void *throw_type_r,
-                        void *objptr, void **valp)
-{
-  const type_info &catch_type = *(const type_info *)catch_type_r;
-  const type_info &throw_type = *(const type_info *)throw_type_r;
-
-  *valp = objptr;
-
-  return catch_type.__do_catch (&throw_type, valp, 1);
-}
-
-/* Called from __cp_pop_exception.  Is P the type_info node for a pointer
-   of some kind?  */
-
-bool
-__is_pointer (void *p)
-{
-  const type_info *t = reinterpret_cast <const type_info *>(p);
-  return t->__is_pointer_p ();
-}
-