aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/Compiler.h
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2013-01-02 20:23:49 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2013-01-02 20:23:49 +0000
commit39227578242d96bc67e4ee1a408bfc0d83c6aa24 (patch)
tree9e7bfcfcbbe0bce7dc56f148c296b723b5b769c3 /include/llvm/Support/Compiler.h
parentc8b18df9a79ddb759d6a563dd7ebd90b85ae4918 (diff)
downloadexternal_llvm-39227578242d96bc67e4ee1a408bfc0d83c6aa24.zip
external_llvm-39227578242d96bc67e4ee1a408bfc0d83c6aa24.tar.gz
external_llvm-39227578242d96bc67e4ee1a408bfc0d83c6aa24.tar.bz2
Restrict __builtin_assume_aligned to gcc 4.7+
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/Compiler.h')
-rw-r--r--include/llvm/Support/Compiler.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h
index c2ee882..5ed30a4 100644
--- a/include/llvm/Support/Compiler.h
+++ b/include/llvm/Support/Compiler.h
@@ -240,7 +240,8 @@
/// \macro LLVM_ASSUME_ALIGNED
/// \brief Returns a pointer with an assumed alignment.
-#if defined(__GNUC__) && !defined(__clang__)
+#if !defined(__clang__) && ((__GNUC__ > 4) \
+ || (__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