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

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

cold.h
Go to the documentation of this file.
1#ifndef RBIMPL_ATTR_COLD_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_ATTR_COLD_H
23#include "ruby/internal/compiler_is.h"
24#include "ruby/internal/has/attribute.h"
25
27#if RBIMPL_COMPILER_IS(SunPro)
28# /* Recent SunPro has __has_attribute, and is borken. */
29# /* It reports it has attribute cold, reality isn't (warnings issued). */
30# define RBIMPL_ATTR_COLD() /* void */
31#elif RBIMPL_HAS_ATTRIBUTE(cold)
32# define RBIMPL_ATTR_COLD() __attribute__((__cold__))
33#else
34# define RBIMPL_ATTR_COLD() /* void */
35#endif
36
37#endif /* RBIMPL_ATTR_COLD_H */
attribute.h
Defines RBIMPL_HAS_ATTRIBUTE.
compiler_is.h
Defines RBIMPL_COMPILER_IS.