Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Fix llvmcall usage again: ptr arg should be literal.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Jan 29, 2018
1 parent c277acd commit 391dc4a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/cgutils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,11 @@ macro wrap(call, attrs="")
julia_argtypes = (jltypes[t] for t in argtypes)
julia_args = (:(convert($argtype, $(esc(arg)))) for (arg, argtype) in zip(args, julia_argtypes))

dest = ("""declare $llvm_ret_typ @$intrinsic($llvm_declargs)""",
"""$llvm_ret_asgn call $llvm_ret_typ @$intrinsic($llvm_defargs)
ret $llvm_ret""")
return quote
Base.llvmcall(
($"""declare $llvm_ret_typ @$intrinsic($llvm_declargs)""",
$"""$llvm_ret_asgn call $llvm_ret_typ @$intrinsic($llvm_defargs)
ret $llvm_ret"""),
$julia_ret_typ, Tuple{$(julia_argtypes...)}, $(julia_args...))
Base.llvmcall($dest, $julia_ret_typ, Tuple{$(julia_argtypes...)}, $(julia_args...))
end
end

Expand Down

0 comments on commit 391dc4a

Please sign in to comment.