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

Ruby 3.4.9p82 (2026-03-11 revision 76cca827ab52ab1d346a728f068d5b8da3e2952b)

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.