123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- #include "typeinfo.h"
- #include <string.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include "se_cdefs.h"
- SGX_ACCESS_VERSION(tstdcxx, 4)
- using std::type_info;
- type_info::~type_info() {}
- bool type_info::operator==(const type_info &other) const
- {
- return __type_name == other.__type_name;
- }
- bool type_info::operator!=(const type_info &other) const
- {
- return __type_name != other.__type_name;
- }
- bool type_info::before(const type_info &other) const
- {
- return __type_name < other.__type_name;
- }
- const char* type_info::name() const
- {
- return __type_name;
- }
- type_info::type_info (const type_info& rhs)
- {
- __type_name = rhs.__type_name;
- }
- type_info& type_info::operator= (const type_info& rhs)
- {
- return *new type_info(rhs);
- }
- __cxxabiv1::__fundamental_type_info::~__fundamental_type_info() {}
- __cxxabiv1::__array_type_info::~__array_type_info() {}
- __cxxabiv1::__function_type_info::~__function_type_info() {}
- __cxxabiv1::__enum_type_info::~__enum_type_info() {}
- __cxxabiv1::__class_type_info::~__class_type_info() {}
- __cxxabiv1::__si_class_type_info::~__si_class_type_info() {}
- __cxxabiv1::__vmi_class_type_info::~__vmi_class_type_info() {}
- __cxxabiv1::__pbase_type_info::~__pbase_type_info() {}
- __cxxabiv1::__pointer_type_info::~__pointer_type_info() {}
- __cxxabiv1::__pointer_to_member_type_info::~__pointer_to_member_type_info() {}
- #if 0
- extern "C" char *__cxa_demangle_gnu3(const char *);
- extern "C" char* __cxa_demangle(const char* mangled_name,
- char* buf,
- size_t* n,
- int* status)
- {
-
-
-
-
-
- char *demangled = __cxa_demangle_gnu3(mangled_name);
- if (NULL != demangled)
- {
- size_t len = strlen(demangled);
- buf = (char*)realloc(buf, len+1);
- if (0 != buf)
- {
- memcpy(buf, demangled, len);
- buf[len] = 0;
- if (n)
- {
- *n = len;
- }
- if (status)
- {
- *status = 0;
- }
- }
- else
- {
- if (status)
- {
- *status = -1;
- }
- }
- free(demangled);
- }
- else
- {
- if (status)
- {
- *status = -2;
- }
- return NULL;
- }
- return buf;
- }
- #endif
|