Migrate ABSL_ATTRIBUTE_SECTION(...) to [[gnu::section(...)]] PiperOrigin-RevId: 1023387273
diff --git a/absl/base/attributes.h b/absl/base/attributes.h index b68c52c..8561c30 100644 --- a/absl/base/attributes.h +++ b/absl/base/attributes.h
@@ -433,9 +433,14 @@ // whatever section its caller is placed into. // #ifndef ABSL_ATTRIBUTE_SECTION +#if ABSL_HAVE_CPP_ATTRIBUTE(gnu::section) && \ + ABSL_HAVE_CPP_ATTRIBUTE(gnu::noinline) +#define ABSL_ATTRIBUTE_SECTION(name) [[gnu::section(#name)]] [[gnu::noinline]] +#else #define ABSL_ATTRIBUTE_SECTION(name) \ __attribute__((section(#name))) __attribute__((noinline)) #endif +#endif // ABSL_ATTRIBUTE_SECTION_VARIABLE //