compiler/types: Don't duplicate empty string
authorCaio Oliveira <caio.oliveira@intel.com>
Fri, 1 Sep 2023 07:16:04 +0000 (00:16 -0700)
committerMarge Bot <emma+marge@anholt.net>
Tue, 12 Sep 2023 23:18:12 +0000 (23:18 +0000)
commit412fe99ea6c59bbbaf68a8f3df208420e4e57eb2
treede9e4f3a261f77fe8d21cefa655d9636f3c7d5d1
parent247f940d3735b6532d4487cd7ff8c0729fb9ea37
compiler/types: Don't duplicate empty string

We can use the static version of the empty string.  There's no worry
about freeing that string incorrectly since what is being deallocated
later is the whole mem_ctx.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25160>
src/compiler/glsl_types.cpp