aboutsummaryrefslogtreecommitdiff
path: root/src/common/assert.cpp
diff options
context:
space:
mode:
authorMarkus Wick <markus@selfnet.de>2021-04-02 08:43:26 +0200
committerMarkus Wick <markus@selfnet.de>2021-04-04 21:19:33 +0200
commit9be819faaf8c1e6882c4ede339f4216d7ea72059 (patch)
tree1da2c1558e2e86d6defe4bf9b797f1171d847a7a /src/common/assert.cpp
parent69b2dbdffd68d232d37a7c30a8ca01aee4f0b7c7 (diff)
common: Move assert failure handling into a cpp file.
Advantage: Altering the handler does not need a full recompilation. Disadvantage: noreturn is droped, so the caller is a bit slower. We quite often run yuzu with a YOLO assertion handler. In fact, only very few games run at all with asserts. This patch allows developers to patch the handler without recompiling everything. The overhead of the missing "noreturn" attribute shoul be negletable.
Diffstat (limited to 'src/common/assert.cpp')
-rw-r--r--src/common/assert.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common/assert.cpp b/src/common/assert.cpp
new file mode 100644
index 0000000000..d7d91b96b0
--- /dev/null
+++ b/src/common/assert.cpp
@@ -0,0 +1,11 @@
+// Copyright 2021 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "common/assert.h"
+
+#include "common/common_funcs.h"
+
+void assert_handle_failure() {
+ Crash();
+}