@@ -1119,18 +1119,23 @@ typedef __char32_t char32_t;
1119
1119
1120
1120
// Optional attributes - these are useful for a better QoI, but not required to be available
1121
1121
1122
+ # define _LIBCPP_NOALIAS __attribute__ ((__malloc__))
1123
+ # define _LIBCPP_NODEBUG [[__gnu__::__nodebug__]]
1124
+ # define _LIBCPP_NO_SANITIZE (...) __attribute__((__no_sanitize__(__VA_ARGS__)))
1125
+ # define _LIBCPP_INIT_PRIORITY_MAX __attribute__ ((__init_priority__(100 )))
1126
+ # define _LIBCPP_ATTRIBUTE_FORMAT (archetype, format_string_index, first_format_arg_index ) \
1127
+ __attribute__ ((__format__(archetype, format_string_index, first_format_arg_index)))
1128
+ # define _LIBCPP_PACKED __attribute__ ((__packed__))
1129
+
1130
+ // Use a function like macro to imply that it must be followed by a semicolon
1131
+ # define _LIBCPP_FALLTHROUGH () [[fallthrough]]
1132
+
1122
1133
# if __has_attribute(__no_sanitize__) && !defined(_LIBCPP_COMPILER_GCC)
1123
1134
# define _LIBCPP_NO_CFI __attribute__ ((__no_sanitize__(" cfi" )))
1124
1135
# else
1125
1136
# define _LIBCPP_NO_CFI
1126
1137
# endif
1127
1138
1128
- # if __has_attribute(__malloc__)
1129
- # define _LIBCPP_NOALIAS __attribute__ ((__malloc__))
1130
- # else
1131
- # define _LIBCPP_NOALIAS
1132
- # endif
1133
-
1134
1139
# if __has_attribute(__using_if_exists__)
1135
1140
# define _LIBCPP_USING_IF_EXISTS __attribute__ ((__using_if_exists__))
1136
1141
# else
@@ -1149,15 +1154,6 @@ typedef __char32_t char32_t;
1149
1154
# define _LIBCPP_DIAGNOSE_WARNING (...)
1150
1155
# endif
1151
1156
1152
- // Use a function like macro to imply that it must be followed by a semicolon
1153
- # if __has_cpp_attribute(fallthrough)
1154
- # define _LIBCPP_FALLTHROUGH () [[fallthrough]]
1155
- # elif __has_attribute(__fallthrough__)
1156
- # define _LIBCPP_FALLTHROUGH () __attribute__((__fallthrough__))
1157
- # else
1158
- # define _LIBCPP_FALLTHROUGH () ((void )0 )
1159
- # endif
1160
-
1161
1157
# if __has_cpp_attribute(_Clang::__lifetimebound__)
1162
1158
# define _LIBCPP_LIFETIMEBOUND [[_Clang::__lifetimebound__]]
1163
1159
# else
@@ -1170,8 +1166,6 @@ typedef __char32_t char32_t;
1170
1166
# define _LIBCPP_NOESCAPE
1171
1167
# endif
1172
1168
1173
- # define _LIBCPP_NODEBUG [[__gnu__::__nodebug__]]
1174
-
1175
1169
# if __has_cpp_attribute(_Clang::__no_specializations__)
1176
1170
# define _LIBCPP_NO_SPECIALIZATIONS \
1177
1171
[[_Clang::__no_specializations__(" Users are not allowed to specialize this standard library entity" )]]
@@ -1191,33 +1185,6 @@ typedef __char32_t char32_t;
1191
1185
# define _LIBCPP_PREFERRED_NAME (x )
1192
1186
# endif
1193
1187
1194
- # if __has_attribute(__no_sanitize__)
1195
- # define _LIBCPP_NO_SANITIZE (...) __attribute__((__no_sanitize__(__VA_ARGS__)))
1196
- # else
1197
- # define _LIBCPP_NO_SANITIZE (...)
1198
- # endif
1199
-
1200
- # if __has_attribute(__init_priority__)
1201
- # define _LIBCPP_INIT_PRIORITY_MAX __attribute__ ((__init_priority__(100 )))
1202
- # else
1203
- # define _LIBCPP_INIT_PRIORITY_MAX
1204
- # endif
1205
-
1206
- # if __has_attribute(__format__)
1207
- // The attribute uses 1-based indices for ordinary and static member functions.
1208
- // The attribute uses 2-based indices for non-static member functions.
1209
- # define _LIBCPP_ATTRIBUTE_FORMAT (archetype, format_string_index, first_format_arg_index ) \
1210
- __attribute__ ((__format__(archetype, format_string_index, first_format_arg_index)))
1211
- # else
1212
- # define _LIBCPP_ATTRIBUTE_FORMAT (archetype, format_string_index, first_format_arg_index ) /* nothing */
1213
- # endif
1214
-
1215
- # if __has_attribute(__packed__)
1216
- # define _LIBCPP_PACKED __attribute__ ((__packed__))
1217
- # else
1218
- # define _LIBCPP_PACKED
1219
- # endif
1220
-
1221
1188
# if defined(_LIBCPP_ABI_MICROSOFT) && __has_declspec_attribute(empty_bases)
1222
1189
# define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec (empty_bases)
1223
1190
# else
0 commit comments