summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder.hpp')
-rw-r--r--src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder.hpp b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder.hpp
index 5182bc4259f..a59fb10902b 100644
--- a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder.hpp
+++ b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder.hpp
@@ -50,7 +50,11 @@ ${func['decl']}
%else:
FunctionType* pFuncTy = FunctionType::get(${ func['returnType'] }, {}, false);
%endif:
+#if LLVM_VERSION_MAJOR >= 9
+ Function* pFunc = cast<Function>(JM()->mpCurrentModule->getOrInsertFunction("meta.intrinsic.${func['name']}", pFuncTy).getCallee());
+#else
Function* pFunc = cast<Function>(JM()->mpCurrentModule->getOrInsertFunction("meta.intrinsic.${func['name']}", pFuncTy));
+#endif
return CALL(pFunc, std::initializer_list<Value*>{${argList}}, name);
%elif isIntrin:
%if len(func['types']) != 0: