From: Ian Romanick Date: Thu, 10 Jun 2010 00:19:10 +0000 (-0700) Subject: ir_constant_visitor: Use clone to create a constant from a variable reference X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d4b33edbd0332addd616a0ba51ce6574c9b83b4f;p=mesa.git ir_constant_visitor: Use clone to create a constant from a variable reference --- diff --git a/ir_constant_expression.cpp b/ir_constant_expression.cpp index 96dfc56e31c..022692b9c92 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(); }