glcpp: Avoid unnecessary strcmp()
authorVladislav Egorov <vegorov180@gmail.com>
Sun, 21 May 2017 20:49:15 +0000 (22:49 +0200)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 22 May 2017 02:34:28 +0000 (12:34 +1000)
commitb8e792ee25e01ce1e9e4f3ed444f8e1ade8c992e
tree1d11443708054eee9b0793a668055ea435aef25a
parent1575a8146a33bfddb2e498ce77fa0ca8f0f0c85e
glcpp: Avoid unnecessary strcmp()

strcmp() is slow. Initiate comparison with "__LINE__" or "__FILE__"
only if the identifier starts with '_', which is rare.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/glcpp/glcpp-parse.y