diff options
| author | 2020-08-24 04:06:18 -0400 | |
|---|---|---|
| committer | 2020-08-24 04:15:10 -0400 | |
| commit | 3bfaabdbdd9e7e74f09c209ad239c5087f702ec0 (patch) | |
| tree | 5209f50b858bd6a504f4fe2c827c803c2a7d1218 /src | |
| parent | Merge pull request #4573 from lioncash/label (diff) | |
| download | yuzu-3bfaabdbdd9e7e74f09c209ad239c5087f702ec0.tar.gz yuzu-3bfaabdbdd9e7e74f09c209ad239c5087f702ec0.tar.xz yuzu-3bfaabdbdd9e7e74f09c209ad239c5087f702ec0.zip | |
common/assert: Make use of C++ attribute syntax
Normalizes the syntax used for attributes
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/assert.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/assert.h b/src/common/assert.h index 5b67c5c52..06d7b5612 100644 --- a/src/common/assert.h +++ b/src/common/assert.h | |||
| @@ -17,11 +17,12 @@ | |||
| 17 | // enough for our purposes. | 17 | // enough for our purposes. |
| 18 | template <typename Fn> | 18 | template <typename Fn> |
| 19 | #if defined(_MSC_VER) | 19 | #if defined(_MSC_VER) |
| 20 | __declspec(noinline, noreturn) | 20 | [[msvc::noinline, noreturn]] |
| 21 | #elif defined(__GNUC__) | 21 | #elif defined(__GNUC__) |
| 22 | __attribute__((noinline, noreturn, cold)) | 22 | [[gnu::cold, gnu::noinline, noreturn]] |
| 23 | #endif | 23 | #endif |
| 24 | static void assert_noinline_call(const Fn& fn) { | 24 | static void |
| 25 | assert_noinline_call(const Fn& fn) { | ||
| 25 | fn(); | 26 | fn(); |
| 26 | Crash(); | 27 | Crash(); |
| 27 | exit(1); // Keeps GCC's mouth shut about this actually returning | 28 | exit(1); // Keeps GCC's mouth shut about this actually returning |