Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions libcxx/include/__exception/exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@
#endif

#ifdef STD_EXCEPTION_HAS_STACK_TRACE
#if defined(OS_DARWIN)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment here, saying that this is a ClickHouse-specific patch of LLVM + the motivation + (if possible) a reference to an issue.

extern "C" int backtrace(void **, int);
#else
extern "C" int unw_backtrace(void **, int);
#endif
#endif

namespace std { // purposefully not using versioning namespace

Expand Down Expand Up @@ -103,7 +107,11 @@ class _LIBCPP_EXPORTED_FROM_ABI exception {
int size = 0;
void capture() _NOEXCEPT
{
#if defined(OS_DARWIN)
size = backtrace(frames, capacity);
#else
size = unw_backtrace(frames, capacity);
#endif
}
#endif
};
Expand Down