diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-06-09 17:19:10 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-06-11 13:51:42 -0700 |
commit | d4b33edbd0332addd616a0ba51ce6574c9b83b4f (patch) | |
tree | 639299fa0f24a717fe26985c4343c7b532b425e3 /ir_constant_expression.cpp | |
parent | 710919fd7cb7ac6cb640afa362f5c409e5a5ec91 (diff) |
ir_constant_visitor: Use clone to create a constant from a variable reference
Diffstat (limited to 'ir_constant_expression.cpp')
-rw-r--r-- | ir_constant_expression.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ir_constant_expression.cpp b/ir_constant_expression.cpp index 96dfc56e31..022692b9c9 100644 --- a/ir_constant_expression.cpp +++ b/ir_constant_expression.cpp @@ -550,7 +550,7 @@ ir_constant_visitor::visit(ir_dereference_variable *ir) ir_variable *var = ir->variable_referenced(); if (var && var->constant_value) - value = new ir_constant(ir->type, &var->constant_value->value); + value = var->constant_value->clone(); } |