glsl: Hide many classes local to individual .cpp files in anon namespaces.
This gives the compiler the chance to inline and not export class symbols
even in the absence of LTO. Saves about 60kb on disk.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@.intel.com>
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 8a143fd..c54b704 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -82,6 +82,8 @@
void linker_error(gl_shader_program *, const char *, ...);
+namespace {
+
/**
* Visitor that determines whether or not a variable is ever written.
*/
@@ -275,6 +277,7 @@
bool found;
};
+} /* anonymous namespace */
void
linker_error(gl_shader_program *prog, const char *fmt, ...)