diff options
author | Eric Anholt <eric@anholt.net> | 2010-06-23 11:37:12 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-06-23 15:20:29 -0700 |
commit | 4b6fd39c89f308a379882426c1ed3616d60c4628 (patch) | |
tree | 2c8f6f7e2e3eae5922a91c61a686457c614068fe /ir.cpp | |
parent | 02fc4b34e40f655eebc99f6502293b4d4000e0b3 (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.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |