1
0
mirror of synced 2024-12-19 11:05:54 +01:00
ImHex/plugins/builtin/source/content/helpers/demangle.cpp

17 lines
441 B
C++
Raw Normal View History

#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;
}
}