diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-06-09 17:30:19 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-06-11 15:37:27 -0700 |
commit | 253dedeb6c3beb5192e76b5abafce58a302d9066 (patch) | |
tree | b37a7e1ba3470ef175716d7bfe30f45a0d16ee8e | |
parent | b94c29a47b5020e4d052679fc5d22c19533fd73b (diff) |
ir_constant_visitor: Handle dereferences of constant records
-rw-r--r-- | ir_constant_expression.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ir_constant_expression.cpp b/ir_constant_expression.cpp index 022692b9c9..8e9e74bb7d 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; } |