forked from OSchip/llvm-project
[libunwind] Remove static_assert / __has_feature macros
The static_assert macro broke on GCC when a scope had two asserts and a condition that depended on a template parameter. Remove the macro and rely on the compiler's C++11 static_assert feature. The __has_feature macro was only used here to determine whether to define the static_assert macro. Reviewed By: mstorsjo, #libunwind Differential Revision: https://reviews.llvm.org/D86411
This commit is contained in:
parent
fa0a855c73
commit
9e32d7b6e7
|
@ -18,16 +18,6 @@
|
|||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
// Define static_assert() unless already defined by compiler.
|
||||
#ifndef __has_feature
|
||||
#define __has_feature(__x) 0
|
||||
#endif
|
||||
#if !(__has_feature(cxx_static_assert)) && !defined(static_assert)
|
||||
#define static_assert(__b, __m) \
|
||||
extern int compile_time_assert_failed[ ( __b ) ? 1 : -1 ] \
|
||||
__attribute__( ( unused ) );
|
||||
#endif
|
||||
|
||||
// Platform specific configuration defines.
|
||||
#ifdef __APPLE__
|
||||
#if defined(FOR_DYLD)
|
||||
|
|
Loading…
Reference in New Issue