glsl: refactor get_variable_being_redeclared() to return always an ir_variable pointer
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Thu, 9 Feb 2017 13:14:29 +0000 (14:14 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Thu, 23 Feb 2017 05:56:45 +0000 (06:56 +0100)
commit6ca4347c827c9b4c577bc04587a5c0070f5b5339
tree4a60ea48b238ef80079d7d67fdb5d97a349605f0
parenta73a61893323c74f38b1baa30d63a5cc665b7b58
glsl: refactor get_variable_being_redeclared() to return always an ir_variable pointer

It will return the current variable ('var') or the earlier declaration ('earlier') in
case of redeclaration of that variable.

In order to distinguish between both, 'is_redeclaration' boolean will indicate in which
case we are.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/glsl/ast_to_hir.cpp