From 70ca263623bdeba6a8ff3b306d4206927cf8c33f Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Mon, 22 Apr 2013 13:59:17 -0700 Subject: [PATCH] glsl: Add virtual function ir_instruction::as_jump() Reviewed-by: Matt Turner Reviewed-by: Kenneth Graunke --- src/glsl/ir.h | 7 +++++++ 1 file changed, 7 insertions(+) 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 { -- 2.30.2