ir_constant_visitor: Handle dereferences of constant records

This commit is contained in:
Ian Romanick 2010-06-09 17:30:19 -07:00
parent b94c29a47b
commit 253dedeb6c

View file

@ -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;
}