From: Ian Romanick Date: Thu, 10 Jun 2010 00:30:19 +0000 (-0700) Subject: ir_constant_visitor: Handle dereferences of constant records X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=253dedeb6c3beb5192e76b5abafce58a302d9066;p=mesa.git ir_constant_visitor: Handle dereferences of constant records --- diff --git a/ir_constant_expression.cpp b/ir_constant_expression.cpp index 022692b9c92..8e9e74bb7d8 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; }