util: Remove unused USED macro

The glapi assembly code used to use this to force some symbols to stay
in the link even if they would normally get garbage-collected. We're not
doing that anymore. If we ever need it again we can add it back, and not
conflate its definition with the PUBLIC macro state while we're at it.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34820>
This commit is contained in:
Adam Jackson 2025-05-05 10:38:32 -04:00 committed by Marge Bot
parent c2267358c6
commit 6abae1d42b

View file

@ -275,24 +275,15 @@ do { \
#endif
/**
* PUBLIC/USED macros
*
* If we build the library with gcc's -fvisibility=hidden flag, we'll
* use the PUBLIC macro to mark functions that are to be exported.
*
* We also need to define a USED attribute, so the optimizer doesn't
* inline a static function that we later use in an alias. - ajax
* This marks symbols that should be visible to dynamic library consumers.
*/
#ifndef PUBLIC
# if defined(_WIN32)
# define PUBLIC __declspec(dllexport)
# define USED
# elif defined(__GNUC__)
# define PUBLIC __attribute__((visibility("default")))
# define USED __attribute__((used))
# else
# define PUBLIC
# define USED
# endif
#endif