This commit is contained in:
Jeremy 2023-11-21 21:32:42 -06:00
parent a106bc4680
commit 3a0db500d0
No known key found for this signature in database
GPG Key ID: B4C8300FEC395042
3 changed files with 5 additions and 4 deletions

View File

@ -371,7 +371,8 @@ namespace cpptrace {
std::exception_ptr nested_ptr() const noexcept;
};
CPPTRACE_EXPORT [[noreturn]] void rethrow_and_wrap_if_needed(std::size_t skip = 0);
// [[noreturn]] must come first due to old clang
[[noreturn]] CPPTRACE_EXPORT void rethrow_and_wrap_if_needed(std::size_t skip = 0);
}
#if defined(CPPTRACE_STD_FORMAT) && defined(__cpp_lib_format)

View File

@ -17,7 +17,7 @@
#else
#include "elf.hpp"
#endif
#if CPPTRACE_HAS_DL_FIND_OBJECT
#ifdef CPPTRACE_HAS_DL_FIND_OBJECT
#include <link.h>
#endif
#elif IS_WINDOWS
@ -64,7 +64,7 @@ namespace detail {
}
}
#endif
#if CPPTRACE_HAS_DL_FIND_OBJECT
#ifdef CPPTRACE_HAS_DL_FIND_OBJECT
inline std::vector<object_frame> get_frames_object_info(const std::vector<frame_ptr>& addrs) {
// Use _dl_find_object when we can, it's orders of magnitude faster
std::vector<object_frame> frames;

View File

@ -12,7 +12,7 @@
#include <cstring>
#include <iostream>
#if CPPTRACE_HAS_DL_FIND_OBJECT
#ifdef CPPTRACE_HAS_DL_FIND_OBJECT
#if IS_LINUX || IS_APPLE
#include <unistd.h>
#include <dlfcn.h>