1
0
mirror of synced 2024-12-14 00:32:52 +01:00
ImHex/plugins/builtin/source/content/helpers/demangle.cpp

17 lines
441 B
C++

#include <content/helpers/demangle.hpp>
#include <llvm/Demangle/Demangle.h>
namespace hex::plugin::builtin {
std::string demangle(const std::string &mangled) {
std::string result = llvm::demangle(mangled);
if (result.empty() || result == mangled)
result = llvm::demangle("_" + mangled);
if (result.empty() || result == ("_" + mangled))
result = mangled;
return result;
}
}