From 3016b2b23fd330d340ebdfd8ac295b41dac9e626 Mon Sep 17 00:00:00 2001 From: William Moses Date: Tue, 3 Dec 2024 20:20:01 -0600 Subject: [PATCH] Update attributes.jl --- src/llvm/attributes.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llvm/attributes.jl b/src/llvm/attributes.jl index 06a8bce108..efa090e7e6 100644 --- a/src/llvm/attributes.jl +++ b/src/llvm/attributes.jl @@ -831,7 +831,7 @@ function annotate!(mod::LLVM.Module) for fn in funcs[fname] push!(parameter_attributes(fn, 2), LLVM.StringAttribute("enzyme_inactive")) push!(parameter_attributes(fn, 4), LLVM.StringAttribute("enzyme_inactive")) - if value_type(LLVM.parameters(fn, 4)) isa LLVM.PointerType + if value_type(LLVM.parameters(fn)[4]) isa LLVM.PointerType push!(parameter_attributes(fn, 4), LLVM.EnumAttribute("writeonly")) push!(parameter_attributes(fn, 4), LLVM.EnumAttribute("nocapture")) end