summaryrefslogtreecommitdiff
path: root/ir.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-06-09 17:18:04 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-11 13:51:42 -0700
commit710919fd7cb7ac6cb640afa362f5c409e5a5ec91 (patch)
treed8dd21dda49155d24169cbd06793f89211c2f9c7 /ir.h
parent7f1ab834d7aa901ce0e12f40db23d7d9891eae59 (diff)
ir_constant: Support constant structures in clone
Diffstat (limited to 'ir.h')
-rw-r--r--ir.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/ir.h b/ir.h
index 8fd823d..86beb2d 100644
--- a/ir.h
+++ b/ir.h
@@ -1055,10 +1055,7 @@ public:
virtual ir_visitor_status accept(ir_hierarchical_visitor *);
- ir_constant *clone()
- {
- return new ir_constant(this->type, &this->value);
- }
+ ir_constant *clone();
/**
* Get a particular component of a constant as a specific type
@@ -1089,6 +1086,12 @@ public:
} value;
exec_list components;
+
+private:
+ /**
+ * Parameterless constructor only used by the clone method
+ */
+ ir_constant(void);
};
void