Add shared CONCAT and PASTE macros
This series unifies several disparate helper macros for concatenating tokens with macros. The chosen nomenclature (subject to feedback) is:
-
PASTE2(a, b)
to directly paste tokens, and -
CONCAT2(a, b)
to paste tokens with an added layer of indirection to allow nested macros to be expanded before pasting.
Equivalents for three and four arguments are named PASTE3
, PASTE4
, CONCAT3
and CONCAT4
.
The nine patches form three groups:
- 1-4 unify the naming of existing macros without removing any definitions,
- 5 adds new shared definitions to
util/macros.h
, and - 6-9 remove other definitions from around the codebase.
For the first and third groups, there is one patch each for amd
, gallium
and glx
, intel
.
I've deliberately not updated the CONCAT()
and CONCAT3()
macros defined and used in assyntax.h, since files that include it appear to be reasonably self-contained otherwise.
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> [intel patches only]
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> [glx+util patches only]
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>