Skip to content

Commit 9546150

Browse files
committed
Deal with changed runtime function.
1 parent 306e09a commit 9546150

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/interop/base.jl

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ Return if a type would be boxed when instantiated in the code generator.
6060
"""
6161
function isboxed(typ::Type)
6262
isboxed_ref = Ref{Bool}()
63-
ccall(:julia_type_to_llvm, LLVM.API.LLVMTypeRef, (Any, Ptr{Bool}), typ, isboxed_ref)
63+
if VERSION >= v"1.5.0-DEV.393"
64+
ccall(:jl_type_to_llvm, LLVM.API.LLVMTypeRef, (Any, Ptr{Bool}), typ, isboxed_ref)
65+
else
66+
ccall(:julia_type_to_llvm, LLVM.API.LLVMTypeRef, (Any, Ptr{Bool}), typ, isboxed_ref)
67+
end
6468
return isboxed_ref[]
6569
end
6670

@@ -71,8 +75,13 @@ Convert a Julia type `typ` to its LLVM representation. Fails if the type would b
7175
"""
7276
function Base.convert(::Type{LLVMType}, typ::Type, allow_boxed::Bool=false)
7377
isboxed_ref = Ref{Bool}()
74-
llvmtyp = LLVMType(ccall(:julia_type_to_llvm, LLVM.API.LLVMTypeRef,
75-
(Any, Ptr{Bool}), typ, isboxed_ref))
78+
if VERSION >= v"1.5.0-DEV.393"
79+
llvmtyp = LLVMType(ccall(:jl_type_to_llvm, LLVM.API.LLVMTypeRef,
80+
(Any, Ptr{Bool}), typ, isboxed_ref))
81+
else
82+
llvmtyp = LLVMType(ccall(:julia_type_to_llvm, LLVM.API.LLVMTypeRef,
83+
(Any, Ptr{Bool}), typ, isboxed_ref))
84+
end
7685
if !allow_boxed && isboxed_ref[]
7786
error("Conversion of boxed type $typ is not allowed")
7887
end

0 commit comments

Comments
 (0)