swr: Fix build with llvm-9.0.
authorVinson Lee <vlee@freedesktop.org>
Mon, 18 Mar 2019 18:52:48 +0000 (11:52 -0700)
committerVinson Lee <vlee@freedesktop.org>
Fri, 22 Mar 2019 20:13:51 +0000 (13:13 -0700)
commit93c81ca336f64c45e43f0c40cb5c5f9084745233
tree4a578675548ca8eab5232cd1176dddcab3135c28
parented96038e55b37501dae0be09287a6209a966eb85
swr: Fix build with llvm-9.0.

Fix build error after llvm-9.0svn r352827 ("[opaque pointer types] Add a
FunctionCallee wrapper type, and use it.").

In file included from ./rasterizer/jitter/builder.h:158:0,
                 from swr_shader.cpp:35:
./rasterizer/jitter/gen_builder_meta.hpp: In member function ‘llvm::Value* SwrJit::Builder::VGATHERPD(llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, const llvm:
:Twine&)’:
./rasterizer/jitter/gen_builder_meta.hpp:51:117: error: no matching function for call to ‘cast(llvm::FunctionCallee)’
     Function* pFunc = cast<Function>(JM()->mpCurrentModule->getOrInsertFunction("meta.intrinsic.VGATHERPD", pFuncTy));
                                                                                                                     ^

Suggested-by: Philip Meulengracht <the_meulengracht@hotmail.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alok Hota <alok.hota@intel.com>
src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder.hpp
src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp