mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-08 00:16:28 +00:00
Remove unreachable code (MSVC warnings)
This commit is contained in:
@@ -24,14 +24,19 @@ template <typename... Ts>
|
||||
|
||||
} // namespace Dynarmic::Common
|
||||
|
||||
#if defined(__clang) || defined(__GNUC__)
|
||||
#define UNREACHABLE() __builtin_unreachable()
|
||||
#define ASSUME(expr) [&]{ if (!(expr)) __builtin_unreachable(); }()
|
||||
#elif defined(_MSC_VER)
|
||||
#define UNREACHABLE() __assume(0)
|
||||
#define ASSUME(expr) __assume(expr)
|
||||
#if defined(NDEBUG)
|
||||
#if defined(__clang) || defined(__GNUC__)
|
||||
#define UNREACHABLE() __builtin_unreachable()
|
||||
#define ASSUME(expr) [&]{ if (!(expr)) __builtin_unreachable(); }()
|
||||
#elif defined(_MSC_VER)
|
||||
#define UNREACHABLE() __assume(0)
|
||||
#define ASSUME(expr) __assume(expr)
|
||||
#else
|
||||
#define UNREACHABLE() ASSERT_FALSE("Unreachable code!")
|
||||
#define ASSUME(expr)
|
||||
#endif
|
||||
#else
|
||||
#define UNREACHABLE() ASSERT_MSG(false, "Unreachable code!")
|
||||
#define UNREACHABLE() ASSERT_FALSE("Unreachable code!")
|
||||
#define ASSUME(expr)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -52,7 +52,6 @@ FPT FPRecipEstimate(FPT op, FPCR fpcr, FPSR& fpsr) {
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
return false;
|
||||
}();
|
||||
|
||||
FPProcessException(FPExc::Overflow, fpcr, fpsr);
|
||||
|
||||
Reference in New Issue
Block a user