File tree 1 file changed +5
-2
lines changed 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ typedef struct objc_object* id;
8
8
#include " objc/runtime.h"
9
9
#include " objc/objc-arc.h"
10
10
#ifdef __MINGW32__
11
- #include < bits/atomic_word.h>
12
11
#include " objc/objc-exception.h"
13
12
#include " objc/hooks.h"
14
13
#endif
@@ -542,7 +541,7 @@ namespace __cxxabiv1
542
541
struct __cxa_refcounted_exception
543
542
{
544
543
// Manage this header.
545
- _Atomic_word referenceCount;
544
+ int referenceCount;
546
545
// __cxa_exception must be last, and no padding can be after it.
547
546
__cxa_exception exc;
548
547
};
@@ -559,6 +558,9 @@ void objc_exception_throw(id object)
559
558
objc_retain (object);
560
559
DEBUG_LOG (" objc_exception_throw: Throwing 0x%x\n " , *exc);
561
560
561
+ #ifdef _LIBCPP_VERSION
562
+ __cxa_throw (exc, & __objc_id_type_info, eh_cleanup);
563
+ #else
562
564
__cxa_eh_globals *globals = __cxa_get_globals ();
563
565
globals->uncaughtExceptions += 1 ;
564
566
__cxa_refcounted_exception *header =
@@ -576,6 +578,7 @@ void objc_exception_throw(id object)
576
578
}
577
579
DEBUG_LOG (" Throw returned %d\n " ,(int ) err);
578
580
abort ();
581
+ #endif
579
582
}
580
583
581
584
OBJC_PUBLIC extern objc_uncaught_exception_handler objc_setUncaughtExceptionHandler (objc_uncaught_exception_handler handler)
You can’t perform that action at this time.
0 commit comments