forked from eden-emu/eden
[dynarmic] fix pch gen (#231)
Signed-off-by: lizzie <lizzie@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: eden-emu/eden#231 Reviewed-by: Lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
0705ba0b47
commit
a3cf780a3a
1 changed files with 15 additions and 0 deletions
|
@ -14,19 +14,34 @@ template<typename... Ts>
|
|||
assert_terminate_impl(expr_str, msg, fmt::make_format_args(args...));
|
||||
}
|
||||
|
||||
// Temporary until MCL is fully removed
|
||||
#ifndef ASSERT_MSG
|
||||
#define ASSERT_MSG(_a_, ...) \
|
||||
([&]() { \
|
||||
if (!(_a_)) [[unlikely]] { \
|
||||
assert_terminate(#_a_, __VA_ARGS__); \
|
||||
} \
|
||||
}())
|
||||
#endif
|
||||
|
||||
#ifndef ASSERT
|
||||
#define ASSERT(_a_) ASSERT_MSG(_a_, "")
|
||||
#endif
|
||||
#ifndef UNREACHABLE
|
||||
#define UNREACHABLE() ASSERT_MSG(false, "unreachable")
|
||||
#endif
|
||||
#ifdef _DEBUG
|
||||
#ifndef DEBUG_ASSERT
|
||||
#define DEBUG_ASSERT(_a_) ASSERT(_a_)
|
||||
#endif
|
||||
#ifndef DEBUG_ASSERT_MSG
|
||||
#define DEBUG_ASSERT_MSG(_a_, ...) ASSERT_MSG(_a_, __VA_ARGS__)
|
||||
#endif
|
||||
#else // not debug
|
||||
#ifndef DEBUG_ASSERT
|
||||
#define DEBUG_ASSERT(_a_)
|
||||
#endif
|
||||
#ifndef DEBUG_ASSERT_MSG
|
||||
#define DEBUG_ASSERT_MSG(_a_, _desc_, ...)
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue