glsl: Fix (and validate) comment above glsl_type::name.
authorPaul Berry <stereotype441@gmail.com>
Wed, 10 Apr 2013 03:36:30 +0000 (20:36 -0700)
committerPaul Berry <stereotype441@gmail.com>
Thu, 11 Apr 2013 16:25:24 +0000 (09:25 -0700)
commit5b0bd8ece855bf4e2171bb5e81968b858fc4792e
tree62f98311a0079aaef8a44a79e63776d88a889513
parent5b2855bfe79bfc3995969f2bf775d89b1bc1808a
glsl: Fix (and validate) comment above glsl_type::name.

The comment above glsl_type::name claimed that it could sometimes be
NULL.  This was wrong--it is never NULL.  Many error handling paths
would segfault if it were.  (Anonymous structs are assigned names like
"#anon_struct_0001"--see the ast_struct_specifier constructor in
glsl_parser_extras.cpp.)

Fix the comment and add assertions to validate that it really is never
NULL.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/glsl_types.cpp
src/glsl/glsl_types.h