Skip to content

Commit

Permalink
Nope, need #ifdef _LIBCPP_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
qmfrederik committed Feb 16, 2024
1 parent c08f725 commit 1b753d8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions objcxx_eh.cc
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ extern "C"
OBJC_PUBLIC
void objc_exception_throw(id object)
{
#ifdef __GLIBCXX__
// Don't bother with a mutex here. It doesn't matter if two threads set
// these values at the same time.
if (!done_setup)
Expand All @@ -558,6 +559,7 @@ void objc_exception_throw(id object)

done_setup = true;
}
#endif

id *exc = (id *)__cxa_allocate_exception(sizeof(id));
*exc = object;
Expand Down

0 comments on commit 1b753d8

Please sign in to comment.