26 #define SPOT_LIKELY(expr) __builtin_expect(!!(expr), 1) 27 #define SPOT_UNLIKELY(expr) __builtin_expect(!!(expr), 0) 29 #define SPOT_LIKELY(expr) (expr) 30 #define SPOT_UNLIKELY(expr) (expr) 34 #define SPOT_DEPRECATED __attribute__ ((deprecated)) 35 #elif defined(_MSC_VER) 36 #define SPOT_DEPRECATED __declspec(deprecated) 38 #define SPOT_DEPRECATED func 41 #if defined _WIN32 || defined __CYGWIN__ 42 #define SPOT_HELPER_DLL_IMPORT __declspec(dllimport) 43 #define SPOT_HELPER_DLL_EXPORT __declspec(dllexport) 44 #define SPOT_HELPER_DLL_LOCAL 47 #define SPOT_HELPER_DLL_IMPORT __attribute__ ((visibility ("default"))) 48 #define SPOT_HELPER_DLL_EXPORT __attribute__ ((visibility ("default"))) 49 #define SPOT_HELPER_DLL_LOCAL __attribute__ ((visibility ("hidden"))) 51 #define SPOT_HELPER_DLL_IMPORT 52 #define SPOT_HELPER_DLL_EXPORT 53 #define SPOT_HELPER_DLL_LOCAL 66 #define SPOT_API SPOT_HELPER_DLL_EXPORT 68 #define SPOT_API SPOT_HELPER_DLL_IMPORT 70 #define SPOT_LOCAL SPOT_HELPER_DLL_LOCAL 75 #define SPOT_API_VAR extern SPOT_API 86 #if defined __clang__ || defined __GNU__ 87 # define SPOT_UNREACHABLE_BUILTIN() __builtin_unreachable() 88 # elif defined _MSC_VER 89 # define SPOT_UNREACHABLE_BUILTIN() __assume(0) 91 # define SPOT_UNREACHABLE_BUILTIN() abort() 96 #define SPOT_UNREACHABLE() do { \ 97 assert(!("unreachable code reached")); \ 98 SPOT_UNREACHABLE_BUILTIN(); \ 101 #define SPOT_UNIMPLEMENTED() throw std::runtime_error("unimplemented"); 106 #define SPOT_RETURN(code) -> decltype(code) { return code; } 114 : std::runtime_error(s)
Definition: common.hh:111