glsl: Set ir_instruction::ir_type in the base class constructor
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 28 May 2014 02:49:04 +0000 (19:49 -0700)
committerMatt Turner <mattst88@gmail.com>
Wed, 4 Jun 2014 00:58:34 +0000 (17:58 -0700)
commit963bd99f03781068610a912516377cbfb69ce3c0
tree99703057e14ac47bfb2f6db78316eaee124e3eef
parent91ff0d4c6510dc38f279c586ced17fba917873e7
glsl: Set ir_instruction::ir_type in the base class constructor

This has the added perk that if you forget to set ir_type in the
constructor of a new subclass (or a new constructor of an existing
subclass) the compiler will tell you... instead of relying on
ir_validate or similar run-time detection.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/ir.cpp
src/glsl/ir.h