glsl: Add ir_variable::is_in_uniform_block predicate

The way a variable is tested for this property is about to change, and
this makes the code easier to modify.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 1d4e2f6..a480dd0 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -1077,7 +1077,7 @@
 	  * will not be eliminated.  Since we always do std140, just
 	  * don't resize arrays in UBOs.
 	  */
-	 if (var->uniform_block != -1)
+	 if (var->is_in_uniform_block())
 	    continue;
 
 	 unsigned int size = var->max_array_access;