Fixed UPB_ASSUME() for non-GCC, non-MSVC platforms.

pull/13171/head
Joshua Haberman 4 years ago
parent e4c8afd0d4
commit 55dd9d3e41
  1. 2
      upb/port_def.inc

@ -141,7 +141,7 @@ int msvc_vsnprintf(char* s, size_t n, const char* format, va_list arg);
#elif defined _MSC_VER
#define UPB_ASSUME(expr) if (!(expr)) __assume(0)
#else
#define UPB_ASSUME(expr) do {} if (false && (expr))
#define UPB_ASSUME(expr) do {} while (false && (expr))
#endif
#else
#define UPB_ASSUME(expr) assert(expr)

Loading…
Cancel
Save