Ruby: include/ruby/internal/attr/noalias.h Source File

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

noalias.h
Go to the documentation of this file.
1#ifndef RBIMPL_ATTR_NOALIAS_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_ATTR_NOALIAS_H
49#include "ruby/internal/compiler_since.h"
50#include "ruby/internal/has/declspec_attribute.h"
51
53#if RBIMPL_COMPILER_BEFORE(Clang, 12, 0, 0)
54# /*
55# * `::llvm::Attribute::ArgMemOnly` was buggy before. Maybe because nobody
56# * actually seriously used it. It seems they somehow mitigated the situation
57# * in LLVM 12. Still not found the exact changeset which fiexed the
58# * attribute, though.
59# *
60# * :FIXME: others (armclang, xlclang, ...) can also be affected?
61# */
62# define RBIMPL_ATTR_NOALIAS() /* void */
63#elif RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noalias)
64# define RBIMPL_ATTR_NOALIAS() __declspec(noalias)
65#else
66# define RBIMPL_ATTR_NOALIAS() /* void */
67#endif
68
69#endif /* RBIMPL_ATTR_NOALIAS_H */
compiler_since.h
Defines RBIMPL_COMPILER_SINCE.
declspec_attribute.h
Defines RBIMPL_HAS_DECLSPEC_ATTRIBUTE.