Skip to content

Commit

Permalink
Replace LLVMGetCalledFunctionType() with getFunctionType() to fix cas…
Browse files Browse the repository at this point in the history
…ting related crash with LLVM 14
  • Loading branch information
karihepola committed May 13, 2022
1 parent 742457b commit 72b4fe4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/llvmopencl/Workgroup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ Workgroup::createArgBufferWorkgroupLauncher(Function *Func,
#ifdef LLVM_OLDER_THAN_14_0
LLVMValueRef Call = LLVMBuildCall(Builder, F, Args, ArgCount, "");
#else
LLVMTypeRef FnTy = LLVMGetCalledFunctionType(F);
LLVMTypeRef FnTy = wrap(Func->getFunctionType());
LLVMValueRef Call = LLVMBuildCall2(Builder, FnTy, F, Args, ArgCount, "");
#endif
LLVMBuildRetVoid(Builder);
Expand Down

0 comments on commit 72b4fe4

Please # to comment.