summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_variable_refcount.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2012-01-28 16:58:37 -0800
committerKenneth Graunke <[email protected]>2012-01-30 17:44:52 -0800
commite3b520049675f78065eccbc25c001ea77861c129 (patch)
treebef7b2bf8bb25cbb2e271685e3434fc64227a940 /src/glsl/ir_variable_refcount.h
parentbed20f02a771f43e1c5092254705701c228cfa7f (diff)
glsl: Rename class variable_entry to ir_variable_refcount_entry.
Exporting a publicly visible class with a generic name like "variable_entry" via ir_variable_refcount.h is kind of mean. Many IR transformers would like to define their own "variable_entry" class. If they accidentally include this header, the compiler/linker may get confused and try to instantiate the wrong variable_entry class, leading to bizarre runtime crashes. The hope is that renaming this one will allow .cpp files to safely declare and use their own file-scope "variable_entry" classes. This avoids crashes caused by converting src/glsl to automake. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-and-tested-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glsl/ir_variable_refcount.h')
-rw-r--r--src/glsl/ir_variable_refcount.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/ir_variable_refcount.h b/src/glsl/ir_variable_refcount.h
index 906135a9e1e..51a4945a135 100644
--- a/src/glsl/ir_variable_refcount.h
+++ b/src/glsl/ir_variable_refcount.h
@@ -33,10 +33,10 @@
#include "ir_visitor.h"
#include "glsl_types.h"
-class variable_entry : public exec_node
+class ir_variable_refcount_entry : public exec_node
{
public:
- variable_entry(ir_variable *var);
+ ir_variable_refcount_entry(ir_variable *var);
ir_variable *var; /* The key: the variable's pointer. */
ir_assignment *assign; /* An assignment to the variable, if any */
@@ -69,9 +69,9 @@ public:
virtual ir_visitor_status visit_enter(ir_function_signature *);
virtual ir_visitor_status visit_leave(ir_assignment *);
- variable_entry *get_variable_entry(ir_variable *var);
+ ir_variable_refcount_entry *get_variable_entry(ir_variable *var);
- /* List of variable_entry */
+ /* List of ir_variable_refcount_entry */
exec_list variable_list;
void *mem_ctx;