Skip to content

Commit 0d05dfb

Browse files
committed
1 parent 3ffa17f commit 0d05dfb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/interop/base.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,21 @@ end
5757
call_function(f::LLVM.Function, rettyp::Type, argtyp::Type, args::Expr)
5858
5959
Generate a call to an LLVM function `f`, given its return type `rettyp` and a tuple-type for
60-
the arguments. The arguments should be passed as an expression yielding a tuple of the
61-
argument values (eg. `:((1,2))`), which will be splatted into the call to the function.
60+
the arguments. The arguments should be passed as a tuple expression containing the argument
61+
values (eg. `:((1,2))`), which will be splatted into the call to the function.
6262
"""
6363
function call_function(llvmf::LLVM.Function, rettyp::Type=Nothing, argtyp::Type=Tuple{},
6464
args::Expr=:())
65+
# TODO: make args an Vararg{Expr} for the next breaking release
6566
if VERSION >= v"1.6.0-DEV.674"
6667
mod = LLVM.parent(llvmf)
6768
ir = string(mod)
6869
fn = LLVM.name(llvmf)
6970
@assert !isempty(fn)
7071
quote
7172
Base.@_inline_meta
72-
Base.llvmcall(($ir,$fn), $rettyp, $argtyp, $args...)
73+
# NOTE: `$args...` stopped being statically evaluatable after JuliaLang/julia#38732
74+
Base.llvmcall(($ir,$fn), $rettyp, $argtyp, $(args.args...))
7375
end
7476
else
7577
@assert context(llvmf) == JuliaContext()

0 commit comments

Comments
 (0)