glsl: remove element_type() helper

We now have is_array() and without_array() that make the
code much clearer and remove the need for this.

For all remaining calls to this we already knew that
the type was an array so returning a null wasn't adding any value.

v2: use without_array() in _mesa_ast_array_index_to_hir() and don't use
 without_array() in lower_clip_distance_visitor() as we want to make sure the
 array is 2D.

Reviewed-by: Matt Turner <mattst88@gmail.com>
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index ecdc025..9798afe 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -224,7 +224,7 @@
          return visit_continue;
       }
 
-      var->type = glsl_type::get_array_instance(var->type->element_type(),
+      var->type = glsl_type::get_array_instance(var->type->fields.array,
                                                 this->num_vertices);
       var->data.max_array_access = this->num_vertices - 1;
 
@@ -245,7 +245,7 @@
    {
       const glsl_type *const vt = ir->array->type;
       if (vt->is_array())
-         ir->type = vt->element_type();
+         ir->type = vt->fields.array;
       return visit_continue;
    }
 };