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

View File

@@ -40,6 +40,8 @@
static bool debug = false;
namespace {
namespace opt_array_splitting {
class variable_entry : public exec_node
@@ -77,6 +79,7 @@ public:
};
} /* namespace */
using namespace opt_array_splitting;
/**
@@ -112,6 +115,8 @@ public:
void *mem_ctx;
};
} /* namespace */
variable_entry *
ir_array_reference_visitor::get_variable_entry(ir_variable *var)
{