File tree 1 file changed +5
-5
lines changed 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
- // Copyright 2015-2024 the openage authors. See copying.md for legal info.
1
+ // Copyright 2015-2025 the openage authors. See copying.md for legal info.
2
2
3
3
#include " compiler.h"
4
4
@@ -24,10 +24,10 @@ namespace util {
24
24
25
25
std::string demangle (const char *symbol) {
26
26
#ifdef _WIN32
27
- // TODO: demangle names for MSVC; Possibly using UnDecorateSymbolName
28
- // https://msdn.microsoft.com/en-us/library/windows/desktop/ms681400(v=vs.85).aspx
29
- // Could it be that MSVC's typeid(T).name() already returns a demangled name? It seems that .raw_name() returns the mangled name
30
- return symbol;
27
+ // MSVC's typeid(T).name() already returns a demangled name
28
+ // unlike clang and gcc the MSVC demangled name is prefixed with "class " or "stuct "
29
+ // we remove the prefix to match the format of clang and gcc
30
+ return strchr ( symbol, ' ' ) + 1 ;
31
31
#else
32
32
int status;
33
33
char *buf = abi::__cxa_demangle (symbol, nullptr , nullptr , &status);
You can’t perform that action at this time.
0 commit comments