mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 17:31:58 -05:00
AK: Use __attribute__((name))
for functions everywhere
Clang enforces the ordering that attributes specified with the `[[attr_name]]` syntax must comes before those defines as `__attribute__((attr_name))`. We don't want to deal with that, so we should stick to a single syntax (for functions, at least). This commit favors the latter, as it's used more widely in the code (for declaring more "exotic" options), and changing those would be a larger effort than modifying this single file.
This commit is contained in:
parent
74535628a8
commit
eee44c85d4
1 changed files with 4 additions and 4 deletions
|
@ -28,22 +28,22 @@
|
||||||
#ifdef ALWAYS_INLINE
|
#ifdef ALWAYS_INLINE
|
||||||
# undef ALWAYS_INLINE
|
# undef ALWAYS_INLINE
|
||||||
#endif
|
#endif
|
||||||
#define ALWAYS_INLINE [[gnu::always_inline]] inline
|
#define ALWAYS_INLINE __attribute__((always_inline)) inline
|
||||||
|
|
||||||
#ifdef NEVER_INLINE
|
#ifdef NEVER_INLINE
|
||||||
# undef NEVER_INLINE
|
# undef NEVER_INLINE
|
||||||
#endif
|
#endif
|
||||||
#define NEVER_INLINE [[gnu::noinline]]
|
#define NEVER_INLINE __attribute__((noinline))
|
||||||
|
|
||||||
#ifdef FLATTEN
|
#ifdef FLATTEN
|
||||||
# undef FLATTEN
|
# undef FLATTEN
|
||||||
#endif
|
#endif
|
||||||
#define FLATTEN [[gnu::flatten]]
|
#define FLATTEN __attribute__((flatten))
|
||||||
|
|
||||||
#ifdef NO_SANITIZE_ADDRESS
|
#ifdef NO_SANITIZE_ADDRESS
|
||||||
# undef NO_SANITIZE_ADDRESS
|
# undef NO_SANITIZE_ADDRESS
|
||||||
#endif
|
#endif
|
||||||
#define NO_SANITIZE_ADDRESS [[gnu::no_sanitize_address]]
|
#define NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
|
||||||
|
|
||||||
// GCC doesn't have __has_feature but clang does
|
// GCC doesn't have __has_feature but clang does
|
||||||
#ifndef __has_feature
|
#ifndef __has_feature
|
||||||
|
|
Loading…
Reference in a new issue