glcpp: Use string_buffer for line continuation removal
authorThomas Helland <thomashelland90@gmail.com>
Sat, 20 May 2017 20:50:09 +0000 (22:50 +0200)
committerThomas Helland <thomashelland90@gmail.com>
Tue, 26 Sep 2017 16:25:20 +0000 (18:25 +0200)
commite7220d2c22b55b8305e5338b80483a6659fb15c8
tree69bf061b320696c904b45bd6c60e5e483f069e55
parentcad323f898fef3c8c1d07152919c3d3c88a26955
glcpp: Use string_buffer for line continuation removal

Migrate removal of line continuations to string_buffer. Before this
it used ralloc_strncat() to append strings, which internally
each time calculates strlen() of its argument. Its argument is
entire shader, so it multiple time scans the whole shader text.

Signed-off-by: Vladislav Egorov <vegorov180@gmail.com>
Tested-by: Dieter Nützel <Dieter at nuetzel-hh.de>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
V2: Adapt to different API of string buffer (Thomas Helland)
src/compiler/glsl/glcpp/pp.c