1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use __bultin_assume() from clang-7

We observed combination of multiple __builtin_assume() can cause
strange compile results on clang-6 (-DNDEBUG exposed this issue).
To avoid this problem, __builtin_assume() is from clang-7.
https://github.com/ruby/ruby/pull/3120#issuecomment-630821333
This commit is contained in:
Koichi Sasada 2020-05-20 02:37:58 +09:00
parent a6403091a5
commit 67d259c5dc
Notes: git 2020-05-20 10:30:06 +09:00

View file

@ -90,7 +90,7 @@ RBIMPL_SYMBOL_EXPORT_END()
# define RBIMPL_ASSERT_OR_ASSUME(_) RUBY_ASSERT(_)
#elif defined(RBIMPL_HAVE___ASSUME)
# define RBIMPL_ASSERT_OR_ASSUME(_) RBIMPL_ASSUME(_)
#elif RBIMPL_HAS_BUILTIN(__builtin_assume)
#elif RBIMPL_HAS_BUILTIN(__builtin_assume) && RBIMPL_COMPILER_SINCE(Clang, 7, 0, 0)
# define RBIMPL_ASSERT_OR_ASSUME(_) RBIMPL_ASSUME(_)
#else
# define RBIMPL_ASSERT_OR_ASSUME(_) /* void */