Skip to content

Commit

Permalink
MSYS2: Enable unexpected exception handling on clang64
Browse files Browse the repository at this point in the history
  • Loading branch information
qmfrederik committed Mar 22, 2024
1 parent cdd58c4 commit bd97071
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ jobs:
- msystem: clang64
package-prefix: clang-x86_64
cmake-flags: LDFLAGS="-lc++"
ctest-flags: -E UnexpectedException*
# Don't abort runners if a single one fails
fail-fast: false
runs-on: ${{ matrix.os }}
Expand Down
7 changes: 0 additions & 7 deletions objcxx_eh_mingw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ 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 @@ -63,17 +62,12 @@ void objc_exception_throw(id object)

done_setup = true;
}
#endif

id *exc = (id *)__cxa_allocate_exception(sizeof(id));
*exc = object;
objc_retain(object);
DEBUG_LOG("objc_exception_throw: Throwing 0x%x\n", *exc);

#ifndef __GLIBCXX__
// At the moment, only libstdc++ exposes __cxa_init_primary_exception.
__cxa_throw(exc, & __objc_id_type_info, eh_cleanup);
#else
__cxa_eh_globals *globals = __cxa_get_globals ();
globals->uncaughtExceptions += 1;
__cxa_refcounted_exception *header =
Expand All @@ -90,7 +84,6 @@ void objc_exception_throw(id object)
}
DEBUG_LOG("Throw returned %d\n",(int) err);
abort();
#endif
}

OBJC_PUBLIC extern objc_uncaught_exception_handler objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler handler)
Expand Down

0 comments on commit bd97071

Please sign in to comment.