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>
This commit is contained in:
Eric Anholt
2013-09-20 11:03:44 -07:00
parent 07572621bc
commit 10ef949424
33 changed files with 126 additions and 2 deletions
+4
View File
@@ -42,6 +42,8 @@
#include "ir_visitor.h"
#include "glsl_types.h"
namespace {
class ir_set_program_inouts_visitor : public ir_hierarchical_visitor {
public:
ir_set_program_inouts_visitor(struct gl_program *prog, GLenum shader_type)
@@ -67,6 +69,8 @@ private:
GLenum shader_type;
};
} /* anonymous namespace */
static inline bool
is_shader_inout(ir_variable *var)
{