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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user