summaryrefslogtreecommitdiff
path: root/ir_constant_expression.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-06-23 11:37:12 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-23 15:20:29 -0700
commit4b6fd39c89f308a379882426c1ed3616d60c4628 (patch)
tree2c8f6f7e2e3eae5922a91c61a686457c614068fe /ir_constant_expression.cpp
parent02fc4b34e40f655eebc99f6502293b4d4000e0b3 (diff)
Add a virtual clone() method to ir_instruction.
This will be used by function inlining, the linker, and avoiding double usage of the LHS deref chains in ++, *=, and similar operations.
Diffstat (limited to 'ir_constant_expression.cpp')
-rw-r--r--ir_constant_expression.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ir_constant_expression.cpp b/ir_constant_expression.cpp
index e9f0499820..effb88844e 100644
--- a/ir_constant_expression.cpp
+++ b/ir_constant_expression.cpp
@@ -546,7 +546,7 @@ ir_constant_visitor::visit(ir_dereference_variable *ir)
ir_variable *var = ir->variable_referenced();
if (var && var->constant_value)
- value = var->constant_value->clone();
+ value = (ir_constant *)var->constant_value->clone(NULL);
}