aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_array_splitting.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-09-20 11:03:44 -0700
committerEric Anholt <[email protected]>2013-09-23 12:45:22 -0700
commit10ef949424809d51c627008bb2feab5a067f8e08 (patch)
tree2433777d7bf49ae1642621e915c0e66fdc96a123 /src/glsl/opt_array_splitting.cpp
parent07572621bc4515c71c56754a2bd9c7c832653d2b (diff)
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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/opt_array_splitting.cpp')
-rw-r--r--src/glsl/opt_array_splitting.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/opt_array_splitting.cpp b/src/glsl/opt_array_splitting.cpp
index f4a7ef99bcd..34ac836ae5c 100644
--- a/src/glsl/opt_array_splitting.cpp
+++ b/src/glsl/opt_array_splitting.cpp
@@ -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)
{