Skip to content
Snippets Groups Projects
Commit 205e8f9f authored by Sam Spilsbury's avatar Sam Spilsbury
Browse files

assert: Add _MSG variations for UNREACHABLE and UNIMPLEMENTED

parent 39d4994c
No related branches found
No related tags found
No related merge requests found
...@@ -39,6 +39,7 @@ static void assert_noinline_call(const Fn& fn) { ...@@ -39,6 +39,7 @@ static void assert_noinline_call(const Fn& fn) {
}); } while (0) }); } while (0)
#define UNREACHABLE() ASSERT_MSG(false, "Unreachable code!") #define UNREACHABLE() ASSERT_MSG(false, "Unreachable code!")
#define UNREACHABLE_MSG(_a_, ...) ASSERT_MSG(false, _a_, __VA_ARGS__)
#ifdef _DEBUG #ifdef _DEBUG
#define DEBUG_ASSERT(_a_) ASSERT(_a_) #define DEBUG_ASSERT(_a_) ASSERT(_a_)
...@@ -49,3 +50,4 @@ static void assert_noinline_call(const Fn& fn) { ...@@ -49,3 +50,4 @@ static void assert_noinline_call(const Fn& fn) {
#endif #endif
#define UNIMPLEMENTED() DEBUG_ASSERT_MSG(false, "Unimplemented code!") #define UNIMPLEMENTED() DEBUG_ASSERT_MSG(false, "Unimplemented code!")
#define UNIMPLEMENTED_MSG(_a_, ...) ASSERT_MSG(false, _a_, __VA_ARGS__)
\ No newline at end of file
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