glcpp: use pre-expansion line number for __LINE__
authorJonathan Marek <jonathan@marek.ca>
Sun, 28 Jul 2019 18:26:00 +0000 (14:26 -0400)
committerJonathan Marek <jonathan@marek.ca>
Tue, 6 Aug 2019 11:27:04 +0000 (11:27 +0000)
commitb514f411837be99b22d4df3a9b8e881a2021d087
tree257e72f84151d465c997bf2f52ded888c7e72d64
parentbc612536eb2f0f77725103e53077ad5a28036ac3
glcpp: use pre-expansion line number for __LINE__

Fixes the following deqp tests:
dEQP-GLES2.functional.shaders.preprocessor.predefined_macros.line_2_*

It don't see the spec requiring this, but it seems to be better, as the
clang preprocessor for example has this behavior.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/glsl/glcpp/glcpp-parse.y