@@ -60,7 +60,11 @@ Return if a type would be boxed when instantiated in the code generator.
6060"""
6161function 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[]
6569end
6670
@@ -71,8 +75,13 @@ Convert a Julia type `typ` to its LLVM representation. Fails if the type would b
7175"""
7276function 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 (:julial_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