summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2013-12-31 03:16:55 +0000
committerAlp Toker <alp@nuanti.com>2013-12-31 03:16:55 +0000
commite27bded35821829745d014f53da2ab5e57fc879e (patch)
treed264bec555790ed9e7eda9c9f448703eb7855f58 /include
parentec62c1ae99557758eb8a6afe11f0e41c196a0411 (diff)
downloadllvm-e27bded35821829745d014f53da2ab5e57fc879e.tar.gz
llvm-e27bded35821829745d014f53da2ab5e57fc879e.tar.bz2
llvm-e27bded35821829745d014f53da2ab5e57fc879e.tar.xz
Silence g++ 4.9 build issue
lib/Support/ThreadLocal.cpp:53:15: error: typedef 'SIZE_TOO_BIG' locally defined but not used [-Werror=unused-local-typedefs] typedef int SIZE_TOO_BIG[sizeof(pthread_key_t) <= sizeof(data) ? 1 : -1]; Done the C++11 way, switching on and using LLVM_STATIC_ASSERT() instead of LLVM_ATTRIBUTE_UNUSED. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198255 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-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 aa66a4ea52..fb6ae5dee3 100644
--- a/include/llvm/Support/Compiler.h
+++ b/include/llvm/Support/Compiler.h
@@ -389,7 +389,8 @@
/// \macro LLVM_STATIC_ASSERT
/// \brief Expands to C/C++'s static_assert on compilers which support it.
-#if __has_feature(cxx_static_assert) || LLVM_MSC_PREREQ(1600)
+#if __has_feature(cxx_static_assert) || \
+ defined(__GXX_EXPERIMENTAL_CXX0X__) || LLVM_MSC_PREREQ(1600)
# define LLVM_STATIC_ASSERT(expr, msg) static_assert(expr, msg)
#elif __has_feature(c_static_assert)
# define LLVM_STATIC_ASSERT(expr, msg) _Static_assert(expr, msg)