Add dynamic cast for ir_loop

This commit is contained in:
Ian Romanick 2010-04-05 17:13:14 -07:00
parent e9d0f265aa
commit 01f8de4a87
1 changed files with 6 additions and 0 deletions

6
ir.h
View File

@ -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
*/