diff options
author | Kenneth Graunke <[email protected]> | 2012-01-28 16:58:37 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-01-30 17:44:52 -0800 |
commit | e3b520049675f78065eccbc25c001ea77861c129 (patch) | |
tree | bef7b2bf8bb25cbb2e271685e3434fc64227a940 /src/glsl/opt_tree_grafting.cpp | |
parent | bed20f02a771f43e1c5092254705701c228cfa7f (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/opt_tree_grafting.cpp')
-rw-r--r-- | src/glsl/opt_tree_grafting.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/opt_tree_grafting.cpp b/src/glsl/opt_tree_grafting.cpp index d32d14e88a9..e2aff5f8071 100644 --- a/src/glsl/opt_tree_grafting.cpp +++ b/src/glsl/opt_tree_grafting.cpp @@ -349,7 +349,7 @@ tree_grafting_basic_block(ir_instruction *bb_first, lhs_var->mode == ir_var_inout) continue; - variable_entry *entry = info->refs->get_variable_entry(lhs_var); + ir_variable_refcount_entry *entry = info->refs->get_variable_entry(lhs_var); if (!entry->declaration || entry->assigned_count != 1 || |