mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
RBIMPL_ATTR_NOALIAS: not until LLVM 12
I observed CI failures. https://github.com/ruby/ruby/actions/runs/1240165911 It turns out that RBIMPL_ATTR_NOALIAS was not mature before. Skip using it for old clang, and everything work as expected.
This commit is contained in:
parent
ecaf3a391d
commit
0dea31c437
Notes:
git
2021-09-22 16:37:37 +09:00
1 changed files with 12 additions and 1 deletions
|
@ -46,10 +46,21 @@
|
||||||
* that has to be passed to the function as a pointer. ::VALUE -taking
|
* that has to be passed to the function as a pointer. ::VALUE -taking
|
||||||
* functions thus cannot be attributed as such.
|
* functions thus cannot be attributed as such.
|
||||||
*/
|
*/
|
||||||
|
#include "ruby/internal/compiler_since.h"
|
||||||
#include "ruby/internal/has/declspec_attribute.h"
|
#include "ruby/internal/has/declspec_attribute.h"
|
||||||
|
|
||||||
/** Wraps (or simulates) `__declspec((noalias))` */
|
/** Wraps (or simulates) `__declspec((noalias))` */
|
||||||
#if RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noalias)
|
#if RBIMPL_COMPILER_BEFORE(Clang, 12, 0, 0)
|
||||||
|
# /*
|
||||||
|
# * `::llvm::Attribute::ArgMemOnly` was buggy before. Maybe because nobody
|
||||||
|
# * actually seriously used it. It seems they somehow mitigated the situation
|
||||||
|
# * in LLVM 12. Still not found the exact changeset which fiexed the
|
||||||
|
# * attribute, though.
|
||||||
|
# *
|
||||||
|
# * :FIXME: others (armclang, xlclang, ...) can also be affected?
|
||||||
|
# */
|
||||||
|
# define RBIMPL_ATTR_NOALIAS() /* void */
|
||||||
|
#elif RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noalias)
|
||||||
# define RBIMPL_ATTR_NOALIAS() __declspec(noalias)
|
# define RBIMPL_ATTR_NOALIAS() __declspec(noalias)
|
||||||
#else
|
#else
|
||||||
# define RBIMPL_ATTR_NOALIAS() /* void */
|
# define RBIMPL_ATTR_NOALIAS() /* void */
|
||||||
|
|
Loading…
Add table
Reference in a new issue