diff --git a/upb/port_def.inc b/upb/port_def.inc index 2c144dc066..7371b6d456 100644 --- a/upb/port_def.inc +++ b/upb/port_def.inc @@ -79,6 +79,10 @@ #define UPB_FORCEINLINE __inline__ __attribute__((always_inline)) #define UPB_NOINLINE __attribute__((noinline)) #define UPB_NORETURN __attribute__((__noreturn__)) +#elif defined(_MSC_VER) +#define UPB_NOINLINE +#define UPB_FORCEINLINE +#define UPB_NORETURN __declspec(noreturn) #else /* !defined(__GNUC__) */ #define UPB_FORCEINLINE #define UPB_NOINLINE