ast_to_hir: Fix crash when a function shadows a variable.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 20 Aug 2010 09:04:52 +0000 (02:04 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 20 Aug 2010 09:46:05 +0000 (02:46 -0700)
commit826a39cb14244820e8539a2328bb52447348f184
tree16cdd90a9d310ec9047b2cf2f4379fa593688658
parente0ef4800f5deb81ed57dccf8ba39e01c12f4beff
ast_to_hir: Fix crash when a function shadows a variable.

The code would attempt to add a new signature to the ir_function, which
didn't exist.  Simply bailing out/returning early seems reasonable.

Fixes piglit test redeclaration-02.vert, and fixes a crash in
redeclaration-03.vert (the test still fails).
src/glsl/ast_to_hir.cpp