diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h index 5ed30a4ef23..b32939eac02 100644 --- a/include/llvm/Support/Compiler.h +++ b/include/llvm/Support/Compiler.h @@ -225,8 +225,6 @@ # define LLVM_BUILTIN_UNREACHABLE __builtin_unreachable() #elif defined(_MSC_VER) # define LLVM_BUILTIN_UNREACHABLE __assume(false) -#else -# define LLVM_BUILTIN_UNREACHABLE 0 #endif /// LLVM_BUILTIN_TRAP - On compilers which support it, expands to an expression @@ -244,9 +242,11 @@ || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) // FIXME: Enable on clang when it supports it. # define LLVM_ASSUME_ALIGNED(p, a) __builtin_assume_aligned(p, a) -#else +#elif defined(LLVM_BUILTIN_UNREACHABLE) # define LLVM_ASSUME_ALIGNED(p, a) \ (((uintptr_t(p) % (a)) == 0) ? (p) : (LLVM_BUILTIN_UNREACHABLE, (p))) +#else +# define LLVM_ASSUME_ALIGNED(p, a) (p) #endif #endif