Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make libc++'s std::type_info::name() demangle.
- Loading branch information
Showing
4 changed files
with
43 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@@ -69,6 +69,8 @@ | ||
#pragma GCC system_header | ||
#endif | ||
|
||
+namespace geordi { char const * demangle(char const *); } | ||
+ | ||
namespace std // purposefully not using versioning namespace | ||
{ | ||
|
||
@@ -98,11 +100,14 @@ | ||
|
||
_LIBCPP_INLINE_VISIBILITY | ||
const char* name() const _NOEXCEPT | ||
+ { | ||
#ifndef _LIBCPP_NONUNIQUE_RTTI_BIT | ||
- {return __type_name;} | ||
+ char const * r = __type_name; | ||
#else | ||
- {return reinterpret_cast<const char*>(__type_name & ~_LIBCPP_NONUNIQUE_RTTI_BIT);} | ||
+ char const * r = reinterpret_cast<const char*>(__type_name & ~_LIBCPP_NONUNIQUE_RTTI_BIT); | ||
#endif | ||
+ return geordi::demangle(r); | ||
+ } | ||
|
||
_LIBCPP_INLINE_VISIBILITY | ||
bool before(const type_info& __arg) const _NOEXCEPT |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters