From 205e8f9f9ece7ee335a1987aa4a1b72f7409abd5 Mon Sep 17 00:00:00 2001 From: Sam Spilsbury Date: Mon, 11 Apr 2016 07:22:41 +0800 Subject: [PATCH] assert: Add _MSG variations for UNREACHABLE and UNIMPLEMENTED --- src/common/assert.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/assert.h b/src/common/assert.h index 6849778b7..d7f19f5eb 100644 --- a/src/common/assert.h +++ b/src/common/assert.h @@ -39,6 +39,7 @@ static void assert_noinline_call(const Fn& fn) { }); } while (0) #define UNREACHABLE() ASSERT_MSG(false, "Unreachable code!") +#define UNREACHABLE_MSG(_a_, ...) ASSERT_MSG(false, _a_, __VA_ARGS__) #ifdef _DEBUG #define DEBUG_ASSERT(_a_) ASSERT(_a_) @@ -49,3 +50,4 @@ static void assert_noinline_call(const Fn& fn) { #endif #define UNIMPLEMENTED() DEBUG_ASSERT_MSG(false, "Unimplemented code!") +#define UNIMPLEMENTED_MSG(_a_, ...) ASSERT_MSG(false, _a_, __VA_ARGS__) \ No newline at end of file