mirror of
https://github.com/yuzu-mirror/dynarmic.git
synced 2026-04-21 06:03:42 +00:00
Remove unreachable code (MSVC warnings)
This commit is contained in:
parent
a8a712c801
commit
5c0bb5cc63
24 changed files with 13 additions and 173 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue