From: Paul Berry Date: Mon, 22 Apr 2013 20:59:17 +0000 (-0700) Subject: glsl: Add virtual function ir_instruction::as_jump() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70ca263623bdeba6a8ff3b306d4206927cf8c33f;p=mesa.git glsl: Add virtual function ir_instruction::as_jump() Reviewed-by: Matt Turner Reviewed-by: Kenneth Graunke --- diff --git a/src/glsl/ir.h b/src/glsl/ir.h index 3018e0fbb16..878a94611a7 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -131,6 +131,7 @@ public: virtual class ir_swizzle * as_swizzle() { return NULL; } virtual class ir_constant * as_constant() { return NULL; } virtual class ir_discard * as_discard() { return NULL; } + virtual class ir_jump * as_jump() { return NULL; } /*@}*/ protected: @@ -1298,6 +1299,12 @@ protected: { ir_type = ir_type_unset; } + +public: + virtual ir_jump *as_jump() + { + return this; + } }; class ir_return : public ir_jump {