@@ -60,7 +60,11 @@ Return if a type would be boxed when instantiated in the code generator.
60
60
"""
61
61
function isboxed (typ:: Type )
62
62
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
64
68
return isboxed_ref[]
65
69
end
66
70
@@ -71,8 +75,13 @@ Convert a Julia type `typ` to its LLVM representation. Fails if the type would b
71
75
"""
72
76
function Base. convert (:: Type{LLVMType} , typ:: Type , allow_boxed:: Bool = false )
73
77
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
76
85
if ! allow_boxed && isboxed_ref[]
77
86
error (" Conversion of boxed type $typ is not allowed" )
78
87
end
0 commit comments