From 39227578242d96bc67e4ee1a408bfc0d83c6aa24 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Wed, 2 Jan 2013 20:23:49 +0000 Subject: [PATCH] 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 --- include/llvm/Support/Compiler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h index c2ee882b754..5ed30a4ef23 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