From 20afbc6af6462bf50d16db6812449d31c82949c6 Mon Sep 17 00:00:00 2001 From: ArtemisX64 Date: Sat, 27 Aug 2022 12:30:31 +0900 Subject: [PATCH] Fix Compilation in Windows --- src/Common/precompiled.cpp | 2 +- src/Common/precompiled.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Common/precompiled.cpp b/src/Common/precompiled.cpp index c08ca1f1..5f656a45 100644 --- a/src/Common/precompiled.cpp +++ b/src/Common/precompiled.cpp @@ -1 +1 @@ -#include "precompiled.h" \ No newline at end of file +#include "precompiled.h" diff --git a/src/Common/precompiled.h b/src/Common/precompiled.h index 8e7da689..449f7ac8 100644 --- a/src/Common/precompiled.h +++ b/src/Common/precompiled.h @@ -225,7 +225,7 @@ typedef union _LARGE_INTEGER { #define DEBUG_BREAK __debugbreak() #define ALIGN(N) __declspec(align(N)) #define NOINLINE __declspec(noinline) - #define ASSUME(X) __assume((X) + #define ASSUME(X) __assume(X) #define THREAD_LOCAL __declspec(thread) #define POPCNT(X) __popcnt((X)) #else @@ -234,7 +234,8 @@ typedef union _LARGE_INTEGER { #define DEBUG_BREAK #define ALIGN(N) __attribute__((aligned (N))) #define NOINLINE __attribute__((noinline)) - #define ASSUME(X) + // fixme: random github solution. use it with caution + #define ASSUME(X) do { if (!(X)) __builtin_unreachable(); } while (0) #define THREAD_LOCAL __thread #define POPCNT(X) __builtin_popcount((X)) #endif