mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-30 16:34:03 +00:00
Support LLVM_STATIC_ASSERT() in clang pre-C++11 mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198292 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e61c70a085
commit
e7d30fb809
@ -21,6 +21,10 @@
|
|||||||
# define __has_feature(x) 0
|
# define __has_feature(x) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __has_extension
|
||||||
|
# define __has_extension(x) 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __has_attribute
|
#ifndef __has_attribute
|
||||||
# define __has_attribute(x) 0
|
# define __has_attribute(x) 0
|
||||||
#endif
|
#endif
|
||||||
@ -394,6 +398,8 @@
|
|||||||
# define LLVM_STATIC_ASSERT(expr, msg) static_assert(expr, msg)
|
# define LLVM_STATIC_ASSERT(expr, msg) static_assert(expr, msg)
|
||||||
#elif __has_feature(c_static_assert)
|
#elif __has_feature(c_static_assert)
|
||||||
# define LLVM_STATIC_ASSERT(expr, msg) _Static_assert(expr, msg)
|
# define LLVM_STATIC_ASSERT(expr, msg) _Static_assert(expr, msg)
|
||||||
|
#elif __has_extension(c_static_assert)
|
||||||
|
# define LLVM_STATIC_ASSERT(expr, msg) LLVM_EXTENSION _Static_assert(expr, msg)
|
||||||
#else
|
#else
|
||||||
# define LLVM_STATIC_ASSERT(expr, msg)
|
# define LLVM_STATIC_ASSERT(expr, msg)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user