Skip to content

Commit bf93f58

Browse files
authored
Clone with local changes in more places. (#289)
1 parent a6e6d0a commit bf93f58

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/irgen.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ function lower_byval(@nospecialize(job::CompilerJob), mod::LLVM.Module, f::LLVM.
483483
param => new_args[i] for (i,param) in enumerate(parameters(f))
484484
)
485485
clone_into!(new_f, f; value_map,
486-
changes=LLVM.API.LLVMCloneFunctionChangeTypeGlobalChanges)
486+
changes=LLVM.API.LLVMCloneFunctionChangeTypeLocalChangesOnly)
487487
# NOTE: we need global changes because LLVM 12 wants to clone debug metadata
488488

489489
# fall through

src/spirv.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,7 @@ function wrap_byval(@nospecialize(job::CompilerJob), mod::LLVM.Module, f::LLVM.F
293293
param => new_args[i] for (i,param) in enumerate(parameters(f))
294294
)
295295
clone_into!(new_f, f; value_map,
296-
changes=LLVM.API.LLVMCloneFunctionChangeTypeGlobalChanges)
297-
# NOTE: we need global changes because LLVM 12 wants to clone debug metadata
296+
changes=LLVM.API.LLVMCloneFunctionChangeTypeLocalChangesOnly)
298297

299298
# apply byval attributes again (`clone_into!` didn't due to the type mismatch)
300299
for i in 1:length(byval)

0 commit comments

Comments
 (0)