Skip to content
Snippets Groups Projects
Unverified Commit 3f7b0e07 authored by bunnei's avatar bunnei Committed by GitHub
Browse files

Merge pull request #4577 from lioncash/asserts

common/assert: Make use of C++ attribute syntax
parents 9864da7d 3bfaabdb
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment