1
0
mirror of synced 2024-12-13 16:31:07 +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;
}
}