From: Ian Romanick Date: Thu, 10 Jun 2010 00:30:19 +0000 (-0700) Subject: ir_constant_visitor: Handle dereferences of constant records X-Git-Tag: 062012170305~10660^2~625^2~145 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=253dedeb6c3beb5192e76b5abafce58a302d9066;p=profile%2Fivi%2Fmesa.git ir_constant_visitor: Handle dereferences of constant records --- diff --git a/ir_constant_expression.cpp b/ir_constant_expression.cpp index 022692b..8e9e74b 100644 --- a/ir_constant_expression.cpp +++ b/ir_constant_expression.cpp @@ -566,9 +566,9 @@ ir_constant_visitor::visit(ir_dereference_array *ir) void ir_constant_visitor::visit(ir_dereference_record *ir) { - (void) ir; - value = NULL; - /* FINISHME: Other dereference modes. */ + ir_constant *v = ir->record->constant_expression_value(); + + this->value = (v != NULL) ? v->get_record_field(ir->field) : NULL; }