summaryrefslogtreecommitdiff
path: root/ir.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.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.cpp')
-rw-r--r--ir.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/ir.cpp b/ir.cpp
index 49191fb929..9514201600 100644
--- a/ir.cpp
+++ b/ir.cpp
@@ -297,8 +297,8 @@ ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list)
}
}
-ir_constant *
-ir_constant::clone()
+ir_instruction *
+ir_constant::clone(struct hash_table *ht) const
{
switch (this->type->base_type) {
case GLSL_TYPE_UINT:
@@ -316,7 +316,7 @@ ir_constant::clone()
; node = node->next) {
ir_constant *const orig = (ir_constant *) node;
- c->components.push_tail(orig->clone());
+ c->components.push_tail(orig->clone(NULL));
}
return c;