Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/irgen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ end
# https://reviews.llvm.org/D79744
function lower_byval(@nospecialize(job::CompilerJob), mod::LLVM.Module, f::LLVM.Function)
ft = function_type(f)
@compiler_assert return_type(ft) == LLVM.VoidType() job
@timeit_debug to "lower byval" begin

# find the byval parameters
Expand Down
1 change: 0 additions & 1 deletion src/metal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ end
# Metal doesn't support passing valuse, so we need to convert those to references instead
function pass_by_reference!(@nospecialize(job::CompilerJob), mod::LLVM.Module, f::LLVM.Function)
ft = function_type(f)
@compiler_assert return_type(ft) == LLVM.VoidType() job

# generate the new function type & definition
args = classify_arguments(job, ft)
Expand Down
3 changes: 1 addition & 2 deletions src/spirv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ end
# wrap byval pointers in a single-value struct
function wrap_byval(@nospecialize(job::CompilerJob), mod::LLVM.Module, f::LLVM.Function)
ft = function_type(f)::LLVM.FunctionType
@compiler_assert return_type(ft) == LLVM.VoidType() job

# find the byval parameters
byval = BitVector(undef, length(parameters(ft)))
Expand Down Expand Up @@ -253,7 +252,7 @@ function wrap_byval(@nospecialize(job::CompilerJob), mod::LLVM.Module, f::LLVM.F
end
push!(new_types, typ)
end
new_ft = LLVM.FunctionType(LLVM.VoidType(), new_types)
new_ft = LLVM.FunctionType(return_type(ft), new_types)
new_f = LLVM.Function(mod, "", new_ft)
linkage!(new_f, linkage(f))
for (arg, new_arg) in zip(parameters(f), parameters(new_f))
Expand Down