Skip to content

Commit 8a9ab5d

Browse files
committed
fix nargs
1 parent 5647a8f commit 8a9ab5d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/helpers/enzyme.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ function deferred_codegen_id_generator(world::UInt, source, self, ft::Type, tt::
7979
ci = CC.retrieve_code_info(mi, world)
8080

8181
# prepare a new code info
82+
# TODO: Can we create a new CI instead of copying a "wrong" one?
8283
new_ci = copy(ci)
8384
empty!(new_ci.code)
8485
@static if isdefined(Core, :DebugInfo)
@@ -99,6 +100,7 @@ function deferred_codegen_id_generator(world::UInt, source, self, ft::Type, tt::
99100
# prepare the slots
100101
new_ci.slotnames = Symbol[Symbol("#self#"), :ft, :tt]
101102
new_ci.slotflags = UInt8[0x00 for i = 1:3]
103+
new_ci.nargs = 3
102104

103105
# We don't know the caller's target so EnzymeTarget uses the default NativeCompilerTarget.
104106
target = EnzymeTarget()

0 commit comments

Comments
 (0)