* 18.6 Language support library, Type identification: <typeinfo>
[lightlibc++.git] / source / cxxabi / typeinfo.cpp
blob2685da9fb1b3d9fc385e22ca179f18ff6b2b6edd
1 /*
2 Permission is granted to use, modify, and / or redistribute at will.
4 This includes removing authorship notices, re-use of code parts in
5 other software (with or without giving credit), and / or creating a
6 commercial product based on it.
8 This permission is not revocable by the author.
10 This software is provided as-is. Use it at your own risk. There is
11 no warranty whatsoever, neither expressed nor implied, and by using
12 this software you accept that the author(s) shall not be held liable
13 for any loss of data, loss of service, or other damages, be they
14 incidental or consequential. Your only option other than accepting
15 this is not to use the software at all.
17 #include <typeinfo>
18 #include <cxxabi.h>
19 #include <string.h>
20 // TODO #include <cstring> // std::strcmp
25 * class std::type_info
28 bool std::type_info::before(const type_info& x) const
30 // TODO std::strcmp
31 return (strcmp(__type_name, x.__type_name) < 0);
37 * class abi::__fundamental_type_info
38 * NOTE: Emits the __fundamental_type_info's for the following types:
39 * void, bool, wchar_t, char, unsigned char, signed char, short,
40 * unsigned short, int, unsigned int, long, unsigned long, long long,
41 * unsigned long long, float, double, long double and for every pointer
42 * and pointer-to-const to these types
43 * And Emits vtables and typeinfo for __fundamental_type_info
46 abi::__fundamental_type_info::~__fundamental_type_info()
53 * NOTE: Emits vtables and typeinfo for __array_type_info, __function_type_info,
54 * __enum_type_info, __pointer_to_member_type_info, __class_type_info,
55 * __si_class_type_info and __vmi_class_type_info
58 abi::__array_type_info::~__array_type_info()
62 abi::__function_type_info::~__function_type_info()
66 abi::__enum_type_info::~__enum_type_info()
70 abi::__pbase_type_info::~__pbase_type_info()
74 abi::__pointer_type_info::~__pointer_type_info()
78 abi::__pointer_to_member_type_info::~__pointer_to_member_type_info()
82 abi::__class_type_info::~__class_type_info()
86 abi::__si_class_type_info::~__si_class_type_info()
90 abi::__vmi_class_type_info::~__vmi_class_type_info()