clover: Fix build with llvm-12.
authorKarol Herbst <kherbst@redhat.com>
Wed, 24 Feb 2021 11:44:41 +0000 (12:44 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 2 Mar 2021 09:16:53 +0000 (09:16 +0000)
commitd1eab2b1eb1dec10197db7d25e27d97f6ca1a2ea
tree2a6aa68e022e8368882bfee0bf5f918dbf4e19a6
parent05f8efbc2cb35298d07ab55d4319cbe470c42108
clover: Fix build with llvm-12.

Fix build error after LLVM commit c495dfe0268b ("[clang][cli] NFC:
Decrease the scope of ParseLangArgs parameters").

../src/gallium/frontends/clover/llvm/invocation.cpp: In function ‘std::unique_ptr<clang::CompilerInstance> {anonymous}::create_compiler_instance(const clover::device&, const string&, const std::vector<std::__cxx11::basic_string<char> >&, std::string&)’:
../src/gallium/frontends/clover/llvm/invocation.cpp:252:55: error: cannot convert ‘clang::PreprocessorOptions’ to ‘std::vector<std::__cxx11::basic_string<char> >&’
  252 |                                 c->getPreprocessorOpts(),
      |                                 ~~~~~~~~~~~~~~~~~~~~~~^~
      |                                                       |
      |                                                       clang::PreprocessorOptions

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4114
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8543>
src/gallium/frontends/clover/llvm/compat.hpp
src/gallium/frontends/clover/llvm/invocation.cpp