From: Ian Romanick Date: Tue, 6 Apr 2010 00:13:14 +0000 (-0700) Subject: Add dynamic cast for ir_loop X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=01f8de4a87157b01e8b9fe31c6766a15bbfb2788;p=mesa.git Add dynamic cast for ir_loop --- diff --git a/ir.h b/ir.h index 4266dbc17aa..fee23b25829 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 */