mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
build: Move all demangler uses into the trace library
This commit is contained in:
@@ -58,7 +58,7 @@ set_target_properties(main PROPERTIES
|
||||
|
||||
target_compile_definitions(main PRIVATE IMHEX_PROJECT_NAME="${PROJECT_NAME}")
|
||||
|
||||
target_link_libraries(main PRIVATE libromfs-imhex libimhex libwolv ${LIBBACKTRACE_LIBRARIES} LLVMDemangle)
|
||||
target_link_libraries(main PRIVATE libromfs-imhex libimhex libwolv ${LIBBACKTRACE_LIBRARIES})
|
||||
if (WIN32)
|
||||
target_link_libraries(main PRIVATE usp10 wsock32 ws2_32 Dwmapi.lib Winmm.lib)
|
||||
|
||||
|
||||
@@ -13,11 +13,9 @@
|
||||
#include <init/tasks.hpp>
|
||||
#include <hex/trace/stacktrace.hpp>
|
||||
|
||||
#include <llvm/Demangle/Demangle.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include <hex/trace/stacktrace.hpp>
|
||||
#include <llvm/Demangle/Demangle.h>
|
||||
|
||||
#include <csignal>
|
||||
#include <exception>
|
||||
@@ -164,7 +162,7 @@ namespace hex::crash {
|
||||
try {
|
||||
std::rethrow_exception(std::current_exception());
|
||||
} catch (std::exception &ex) {
|
||||
std::string exceptionStr = hex::format("{}()::what() -> {}", llvm::demangle(std::string("_Z") + typeid(ex).name()), ex.what());
|
||||
std::string exceptionStr = hex::format("{}()::what() -> {}", trace::demangle(typeid(ex).name()), ex.what());
|
||||
|
||||
handleCrash(exceptionStr);
|
||||
log::fatal("Program terminated with uncaught exception: {}", exceptionStr);
|
||||
|
||||
Reference in New Issue
Block a user