diff options
author | KokaKiwi | 2024-02-26 00:12:22 +0100 |
---|---|---|
committer | KokaKiwi | 2024-02-26 00:12:22 +0100 |
commit | 2ef9c0d4ff5717bc44ccd0b9997f370823fe769b (patch) | |
tree | ad7a1bae1a2406891d62443b0d5a9db2cf4c2024 /0001-fix-main-Handle-different-LLVM-version.patch | |
parent | 571c2a2525b657eda4e1f9133b3ae06f77c2b6f8 (diff) | |
download | aur-2ef9c0d4ff5717bc44ccd0b9997f370823fe769b.tar.gz |
upgpkg: imhex 1.33.0-1
upstream release
Diffstat (limited to '0001-fix-main-Handle-different-LLVM-version.patch')
-rw-r--r-- | 0001-fix-main-Handle-different-LLVM-version.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/0001-fix-main-Handle-different-LLVM-version.patch b/0001-fix-main-Handle-different-LLVM-version.patch new file mode 100644 index 000000000000..1e7a30b882b5 --- /dev/null +++ b/0001-fix-main-Handle-different-LLVM-version.patch @@ -0,0 +1,37 @@ +From be234084019fef70a7cb45e4f6208e340fc2d5f0 Mon Sep 17 00:00:00 2001 +From: KokaKiwi <kokakiwi+git@kokakiwi.net> +Date: Sun, 31 Dec 2023 13:29:36 +0100 +Subject: [PATCH] fix(main): Handle different LLVM version + +--- + main/gui/source/crash_handlers.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/main/gui/source/crash_handlers.cpp b/main/gui/source/crash_handlers.cpp +index 4b013d9e..9dfdebdc 100644 +--- a/main/gui/source/crash_handlers.cpp ++++ b/main/gui/source/crash_handlers.cpp +@@ -14,6 +14,8 @@ + #include <nlohmann/json.hpp> + + #include <stacktrace.hpp> ++ ++#include <llvm/Config/llvm-config.h> + #include <llvm/Demangle/Demangle.h> + + #include <csignal> +@@ -142,7 +144,11 @@ namespace hex::crash { + try { + std::rethrow_exception(std::current_exception()); + } catch (std::exception &ex) { ++#if LLVM_VERSION_MAJOR >= 17 + std::string exceptionStr = hex::format("{}()::what() -> {}", llvm::itaniumDemangle(typeid(ex).name()), ex.what()); ++#else ++ std::string exceptionStr = hex::format("{}()::what() -> {}", llvm::itaniumDemangle(typeid(ex).name(), nullptr, nullptr, nullptr), ex.what()); ++#endif + + handleCrash(exceptionStr); + log::fatal("Program terminated with uncaught exception: {}", exceptionStr); +-- +2.44.0 + |