diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-05-19 11:37:35 +0200 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-05-26 15:23:19 -0700 |
commit | 70fe8b66632f4afd87ebb12a450b1e639428e88f (patch) | |
tree | a3eae48e0cf4b2ae22a61efd4e825961938137ba /ir_expression_flattening.cpp | |
parent | 461c294ac57e387aa2355cfd2aa93cefaba03baa (diff) |
Begin refactoring ir_dereference
Create separate subclasses of ir_dereference for variable, array, and
record dereferences. As a side effect, array and record dereferences
no longer point to ir_variable objects directly. Instead they each
point to an ir_dereference_variable object.
This is the first of several steps in the refactoring process. The
intention is that ir_dereference will eventually become an abstract
base class.
Diffstat (limited to 'ir_expression_flattening.cpp')
-rw-r--r-- | ir_expression_flattening.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ir_expression_flattening.cpp b/ir_expression_flattening.cpp index 28c96a787d..9494786d4e 100644 --- a/ir_expression_flattening.cpp +++ b/ir_expression_flattening.cpp @@ -143,12 +143,12 @@ ir_expression_flattening_visitor::visit(ir_expression *ir) var = new ir_variable(ir->operands[operand]->type, "flattening_tmp"); this->base_ir->insert_before(var); - assign = new ir_assignment(new ir_dereference(var), + assign = new ir_assignment(new ir_dereference_variable(var), ir->operands[operand], NULL); this->base_ir->insert_before(assign); - ir->operands[operand] = new ir_dereference(var); + ir->operands[operand] = new ir_dereference_variable(var); } } } |