mirror of
https://github.com/azahar-emu/dynarmic
synced 2025-11-11 17:39:59 +01:00
assert: Use attribute specifier syntax with non MSVC compilers (#12)
This commit is contained in:
parent
cc3e7e71aa
commit
3e03524658
@ -18,11 +18,11 @@ template <typename Fn>
|
|||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
__declspec(noinline, noreturn)
|
__declspec(noinline, noreturn)
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
__attribute__((noinline, noreturn, cold))
|
[[noreturn, gnu::noinline, gnu::cold]]
|
||||||
#endif
|
#endif
|
||||||
static void assert_noinline_call(const Fn& fn) {
|
static void assert_noinline_call(const Fn& fn) {
|
||||||
fn();
|
fn();
|
||||||
exit(1); // Keeps GCC's mouth shut about this actually returning
|
exit(EXIT_FAILURE); // Keeps GCC's mouth shut about this actually returning
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ASSERT(_a_) \
|
#define ASSERT(_a_) \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user