summaryrefslogtreecommitdiff
path: root/ir.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-04-05 17:13:14 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-04-07 11:42:36 -0700
commit01f8de4a87157b01e8b9fe31c6766a15bbfb2788 (patch)
tree630891da18e1a4d9d5a7e3b52f0a920a0ae651c8 /ir.h
parente9d0f265aabb39928d4d8a527684bf3b9eebc21c (diff)
Add dynamic cast for ir_loop
Diffstat (limited to 'ir.h')
-rw-r--r--ir.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ir.h b/ir.h
index 4266dbc..fee23b2 100644
--- a/ir.h
+++ b/ir.h
@@ -54,6 +54,7 @@ public:
virtual class ir_variable * as_variable() { return NULL; }
virtual class ir_dereference * as_dereference() { return NULL; }
virtual class ir_rvalue * as_rvalue() { return NULL; }
+ virtual class ir_loop * as_loop() { return NULL; }
/*@}*/
protected:
@@ -302,6 +303,11 @@ public:
v->visit(this);
}
+ virtual ir_loop *as_loop()
+ {
+ return this;
+ }
+
/**
* Get an iterator for the instructions of the loop body
*/