Explorar o código

assert: Add _MSG variations for UNREACHABLE and UNIMPLEMENTED

Sam Spilsbury %!s(int64=10) %!d(string=hai) anos
pai
achega
205e8f9f9e
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/common/assert.h

+ 2 - 0
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__)