glsl: Make ir_dereference_record constructor assert the variable exists.
glsl: Make ir_dereference_record constructor assert the variable exists.

Providing a NULL pointer to the ir_dereference_record() constructor
seems like a bad idea.  Currently, if provided NULL, it returns a
partially constructed value of error type.  However, none of the callers
are prepared to handle that scenario.

Code inspection shows that all callers do one of the following:
- Already NULL-check the argument prior to creating the dereference
- Already deference the argument (and thus would crash if it were NULL)
- Newly allocate the argument.

Thus, it should be safe to simply assert the value passed is not NULL.
This should also catch issues right away, rather than dying later.

Signed-off-by: Kenneth Graunke <bd2562f754ec92342f93f61c25d731e290a2ffa8@whitecape.org>
Reviewed-by: Eric Anholt <96f164ad4d9b2b0dacf8ebee2bb1eeb3aa69adf1@anholt.net>

zz85/glsl-optimizer,metora/MesaGLSLCompiler,bkaradzic/glsl-optimizer,djreep81/glsl-optimizer,mcanthony/glsl-optimizer,mapbox/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,mcanthony/glsl-optimizer,mapbox/glsl-optimizer,djreep81/glsl-optimizer,zz85/glsl-optimizer,tokyovigilante/glsl-optimizer,zz85/glsl-optimizer,wolf96/glsl-optimizer,wolf96/glsl-optimizer,tokyovigilante/glsl-optimizer,zeux/glsl-optimizer,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,wolf96/glsl-optimizer,djreep81/glsl-optimizer,wolf96/glsl-optimizer,dellis1972/glsl-optimizer,metora/MesaGLSLCompiler,jbarczak/glsl-optimizer,djreep81/glsl-optimizer,zz85/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,tokyovigilante/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,tokyovigilante/glsl-optimizer,jbarczak/glsl-optimizer,tokyovigilante/glsl-optimizer,bkaradzic/glsl-optimizer,metora/MesaGLSLCompiler,wolf96/glsl-optimizer,zz85/glsl-optimizer,benaadams/glsl-optimizer,mapbox/glsl-optimizer,mcanthony/glsl-optimizer,zeux/glsl-optimizer,dellis1972/glsl-optimizer,benaadams/glsl-optimizer,mapbox/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,mapbox/glsl-optimizer,benaadams/glsl-optimizer,djreep81/glsl-optimizer