mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
Introduce LLVM_STATIC_ASSERT macro, which expands to C/C++'s static_assert on compilers which support it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177699 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f0b0f1f9d9
commit
d1995b2a36
@ -351,4 +351,14 @@
|
||||
#define LLVM_EXPLICIT
|
||||
#endif
|
||||
|
||||
/// \macro LLVM_STATIC_ASSERT
|
||||
/// \brief Expands to C/C++'s static_assert on compilers which support it.
|
||||
#if __has_feature(cxx_static_assert)
|
||||
# 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)
|
||||
#else
|
||||
# define LLVM_STATIC_ASSERT(expr, msg)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user