Browse Source

atleast put file :)

Signed-off-by: lizzie <lizzie@eden-emu.dev>
pull/2890/head
lizzie 3 months ago
parent
commit
9aab1140db
No known key found for this signature in database GPG Key ID: 287378CADCAB13
  1. 5
      src/dynarmic/src/dynarmic/common/assert.h

5
src/dynarmic/src/dynarmic/common/assert.h

@ -6,13 +6,14 @@
#pragma once #pragma once
// TODO: Use source_info?
[[noreturn]] void assert_terminate_impl(const char* s); [[noreturn]] void assert_terminate_impl(const char* s);
#ifndef ASSERT #ifndef ASSERT
# define ASSERT(expr) do if(!(expr)) [[unlikely]] assert_terminate_impl(__FILE__ ":" #__LINE__ ": " #expr); while(0)
# define ASSERT(expr) do if(!(expr)) [[unlikely]] assert_terminate_impl(__FILE__ ": " #expr); while(0)
#endif #endif
#ifndef UNREACHABLE #ifndef UNREACHABLE
# ifdef _MSC_VER # ifdef _MSC_VER
# define UNREACHABLE() ASSERT(false && __FILE__ ":" #__LINE__ ": unreachable")
# define UNREACHABLE() ASSERT(false && __FILE__ ": unreachable")
# else # else
# define UNREACHABLE() __builtin_unreachable(); # define UNREACHABLE() __builtin_unreachable();
# endif # endif

Loading…
Cancel
Save