glsl/parser: Move anonymous struct name handling to the parser
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 26 Sep 2017 03:29:35 +0000 (20:29 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 30 Oct 2017 16:27:09 +0000 (09:27 -0700)
commit792acfc44aabc09a19a1d2ef77369159ddb41e66
tree8a7ba85cf94f4249ab1e66d8e0c139b638d6909c
parentfc07ab165b1aaf6a64e61ade9eb605165146cd96
glsl/parser: Move anonymous struct name handling to the parser

There are two callers of the constructor, and they are right next to
each other.  Move the "#anon_struct" name handling to the parser so that
the conditional can be removed.

I've also deleted part of the comment (about the memory leak) because I
don't think it's quite accurate or relevant.

   text    data     bss     dec     hex filename
8310399  269336  294072 8873807  87674f 32-bit i965_dri.so before
8310339  269336  294072 8873747  876713 32-bit i965_dri.so after
7845611  346552  420592 8612755  836b93 64-bit i965_dri.so before
7845579  346552  420592 8612723  836b73 64-bit i965_dri.so after

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/compiler/glsl/glsl_parser.yy
src/compiler/glsl/glsl_parser_extras.cpp