// Methods for type_info for -*- C++ -*- Run Time Type Identification.
-// Copyright (C) 1994, 1996, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1994, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// 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
return false;
}
-};
+}
namespace {
ptrdiff_t whole_object;
// Additional padding if necessary.
-#ifdef _GLIBCPP_VTABLE_PADDING
+#ifdef _GLIBCXX_VTABLE_PADDING
ptrdiff_t padding1;
#endif
const __class_type_info *whole_type;
// Additional padding if necessary.
-#ifdef _GLIBCPP_VTABLE_PADDING
+#ifdef _GLIBCXX_VTABLE_PADDING
ptrdiff_t padding2;
#endif
static const __class_type_info *const nonvirtual_base_type =
static_cast <const __class_type_info *> (0) + 1;
-}; // namespace
+} // namespace
namespace __cxxabiv1
{
// 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), part2dst (__unknown), src_details (d), base_type (NULL)
{}
__sub_kind dst2src; // path from target to sub object
int whole_details; // details of the whole class hierarchy
- public:
__dyncast_result (int details_ = __vmi_class_type_info::__flags_unknown_mask)
:dst_ptr (NULL), whole2dst (__unknown),
whole2src (__unknown), dst2src (__unknown),
whole_details (details_)
{}
+
+protected:
+ __dyncast_result(const __dyncast_result&);
+
+ __dyncast_result&
+ operator=(const __dyncast_result&);
};
bool __class_type_info::
}
base = convert_to_base (base, is_virtual, offset);
- __sub_kind base_kind = __base_info[i].__base->__do_find_public_src
+ __sub_kind base_kind = __base_info[i].__base_type->__do_find_public_src
(src2dst, base, src_type, src_ptr);
if (contained_p (base_kind))
{
}
bool result2_ambig
- = __base_info[i].__base->__do_dyncast (src2dst, base_access,
+ = __base_info[i].__base_type->__do_dyncast (src2dst, base_access,
dst_type, base,
src_type, src_ptr, result2);
result.whole2src = __sub_kind (result.whole2src | result2.whole2src);
result.whole2dst =
__sub_kind (result.whole2dst | result2.whole2dst);
}
- else if ((result.dst_ptr != 0 | result_ambig)
- && (result2.dst_ptr != 0 | result2_ambig))
+ else if ((result.dst_ptr != 0 & result2.dst_ptr != 0)
+ || (result.dst_ptr != 0 & result2_ambig)
+ || (result2.dst_ptr != 0 & result_ambig))
{
// Found two different DST_TYPE bases, or a valid one and a set of
// ambiguous ones, must disambiguate. See whether SRC_PTR is
if (base)
base = convert_to_base (base, is_virtual, offset);
- if (__base_info[i].__base->__do_upcast (dst, base, result2))
+ if (__base_info[i].__base_type->__do_upcast (dst, base, result2))
{
if (result2.base_type == nonvirtual_base_type && is_virtual)
- result2.base_type = __base_info[i].__base;
+ result2.base_type = __base_info[i].__base_type;
if (contained_p (result2.part2dst) && !is_public)
result2.part2dst = __sub_kind (result2.part2dst & ~__contained_public_mask);
return NULL;
}
-}; // namespace __cxxabiv1
+} // namespace __cxxabiv1