[llvm] r217545 - Enable use of __builtin_assume_aligned when self-hosting
Hal Finkel
hfinkel at anl.gov
Wed Sep 10 14:06:11 PDT 2014
Author: hfinkel
Date: Wed Sep 10 16:06:11 2014
New Revision: 217545
URL: http://llvm.org/viewvc/llvm-project?rev=217545&view=rev
Log:
Enable use of __builtin_assume_aligned when self-hosting
Clang/LLVM trunk now have support for __builtin_assume_aligned, turn this &&
into an || so we can use it ourselves.
Modified:
llvm/trunk/include/llvm/Support/Compiler.h
Modified: llvm/trunk/include/llvm/Support/Compiler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=217545&r1=217544&r2=217545&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h (original)
+++ llvm/trunk/include/llvm/Support/Compiler.h Wed Sep 10 16:06:11 2014
@@ -284,7 +284,7 @@
/// \macro LLVM_ASSUME_ALIGNED
/// \brief Returns a pointer with an assumed alignment.
-#if __has_builtin(__builtin_assume_aligned) && __GNUC_PREREQ(4, 7)
+#if __has_builtin(__builtin_assume_aligned) || __GNUC_PREREQ(4, 7)
# define LLVM_ASSUME_ALIGNED(p, a) __builtin_assume_aligned(p, a)
#elif defined(LLVM_BUILTIN_UNREACHABLE)
// As of today, clang does not support __builtin_assume_aligned.
More information about the llvm-commits
mailing list