clover: Fix build after clang r370122.
authorHal Gentz <zegentzy@protonmail.com>
Sun, 1 Sep 2019 23:31:04 +0000 (17:31 -0600)
committerAaron Watry <awatry@gmail.com>
Thu, 5 Sep 2019 03:29:52 +0000 (22:29 -0500)
commit55c912883c9b3624ee060fe1a0232cf71e329d80
tree5b8cc8b118d495cb6f5697c51ab4f6eac317a4d6
parente716a9e21330a743f104a00fa624713646e6657c
clover: Fix build after clang r370122.

../mesa/src/gallium/state_trackers/clover/llvm/invocation.cpp: In function ‘std::unique_ptr<clang::CompilerInstance> {anonymous}::create_compiler_instance(const clover::device&, const std::vector<std::__cxx11::basic_string<char> >&, std::string&)’:
../mesa/src/gallium/state_trackers/clover/llvm/invocation.cpp:203:81: error: no matching function for call to ‘clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, const char* const*, const char* const*, clang::DiagnosticsEngine&)’
  203 |              c->getInvocation(), copts.data(), copts.data() + copts.size(), diag))
      |                                                                                 ^
In file included from /opt/llvm64/include/clang/Frontend/CompilerInstance.h:15,
                 from ../mesa/src/gallium/state_trackers/clover/llvm/codegen.hpp:37,
                 from ../mesa/src/gallium/state_trackers/clover/llvm/invocation.cpp:49:
/opt/llvm64/include/clang/Frontend/CompilerInvocation.h:157:15: note: candidate: ‘static bool clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, llvm::ArrayRef<const char*>, clang::DiagnosticsEngine&)’
  157 |   static bool CreateFromArgs(CompilerInvocation &Res,
      |               ^~~~~~~~~~~~~~
/opt/llvm64/include/clang/Frontend/CompilerInvocation.h:157:15: note:   candidate expects 3 arguments, 4 provided

Signed-off-by: Hal Gentz <zegentzy@protonmail.com>
Reviewed-by: Aaron Watry <awatry@gmail.com>
src/gallium/state_trackers/clover/llvm/compat.hpp
src/gallium/state_trackers/clover/llvm/invocation.cpp