00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include <cstddef>
00033 #include "tinfo.h"
00034 #include "new"
00035
00036
00037 extern "C" void abort ();
00038
00039 using std::type_info;
00040
00041 #if !__GXX_MERGED_TYPEINFO_NAMES
00042
00043 bool
00044 type_info::before (const type_info &arg) const
00045 {
00046 return __builtin_strcmp (name (), arg.name ()) < 0;
00047 }
00048
00049 #endif
00050
00051 #include <cxxabi.h>
00052
00053 namespace __cxxabiv1 {
00054
00055 using namespace std;
00056
00057
00058
00059
00060 __fundamental_type_info::
00061 ~__fundamental_type_info ()
00062 {}
00063
00064 __array_type_info::
00065 ~__array_type_info ()
00066 {}
00067
00068 __function_type_info::
00069 ~__function_type_info ()
00070 {}
00071
00072 __enum_type_info::
00073 ~__enum_type_info ()
00074 {}
00075
00076 __pbase_type_info::
00077 ~__pbase_type_info ()
00078 {}
00079
00080 __pointer_type_info::
00081 ~__pointer_type_info ()
00082 {}
00083
00084 __pointer_to_member_type_info::
00085 ~__pointer_to_member_type_info ()
00086 {}
00087
00088 bool __pointer_type_info::
00089 __is_pointer_p () const
00090 {
00091 return true;
00092 }
00093
00094 bool __function_type_info::
00095 __is_function_p () const
00096 {
00097 return true;
00098 }
00099
00100 bool __pbase_type_info::
00101 __do_catch (const type_info *thr_type,
00102 void **thr_obj,
00103 unsigned outer) const
00104 {
00105 if (*this == *thr_type)
00106 return true;
00107 if (typeid (*this) != typeid (*thr_type))
00108 return false;
00109
00110 if (!(outer & 1))
00111
00112
00113
00114 return false;
00115
00116 const __pbase_type_info *thrown_type =
00117 static_cast <const __pbase_type_info *> (thr_type);
00118
00119 if (thrown_type->__qualifier_flags & ~__qualifier_flags)
00120
00121 return false;
00122
00123 if (!(__qualifier_flags & __const_mask))
00124 outer &= ~1;
00125
00126 return __pointer_catch (thrown_type, thr_obj, outer);
00127 }
00128
00129 inline bool __pbase_type_info::
00130 __pointer_catch (const __pbase_type_info *thrown_type,
00131 void **thr_obj,
00132 unsigned outer) const
00133 {
00134 return __pointee->__do_catch (thrown_type->__pointee, thr_obj, outer + 2);
00135 }
00136
00137 bool __pointer_type_info::
00138 __pointer_catch (const __pbase_type_info *thrown_type,
00139 void **thr_obj,
00140 unsigned outer) const
00141 {
00142 if (outer < 2 && *__pointee == typeid (void))
00143 {
00144
00145 return !thrown_type->__pointee->__is_function_p ();
00146 }
00147
00148 return __pbase_type_info::__pointer_catch (thrown_type, thr_obj, outer);
00149 }
00150
00151 bool __pointer_to_member_type_info::
00152 __pointer_catch (const __pbase_type_info *thr_type,
00153 void **thr_obj,
00154 unsigned outer) const
00155 {
00156
00157
00158 const __pointer_to_member_type_info *thrown_type =
00159 static_cast <const __pointer_to_member_type_info *> (thr_type);
00160
00161 if (*__context_class != *thrown_type->__context_class)
00162 return false;
00163
00164 return __pbase_type_info::__pointer_catch (thrown_type, thr_obj, outer);
00165 }
00166
00167 }