Port yuzu-emu/yuzu#4577: "common/assert: Make use of C++ attribute syntax" (#5529)
Co-authored-by: Lioncash <mathew1800@gmail.com>
This commit is contained in:
parent
2f01046f77
commit
66846836bc
|
@ -17,11 +17,12 @@
|
|||
// enough for our purposes.
|
||||
template <typename Fn>
|
||||
#if defined(_MSC_VER)
|
||||
__declspec(noinline, noreturn)
|
||||
[[msvc::noinline, noreturn]]
|
||||
#elif defined(__GNUC__)
|
||||
__attribute__((noinline, noreturn, cold))
|
||||
[[gnu::cold, gnu::noinline, noreturn]]
|
||||
#endif
|
||||
static void assert_noinline_call(const Fn& fn) {
|
||||
static void
|
||||
assert_noinline_call(const Fn& fn) {
|
||||
fn();
|
||||
Crash();
|
||||
exit(1); // Keeps GCC's mouth shut about this actually returning
|
||||
|
|
Reference in New Issue