File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 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.
22
33#include " compiler.h"
44
@@ -24,10 +24,10 @@ namespace util {
2424
2525std::string demangle (const char *symbol) {
2626#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 ;
3131#else
3232 int status;
3333 char *buf = abi::__cxa_demangle (symbol, nullptr , nullptr , &status);
You can’t perform that action at this time.
0 commit comments