Skip to content

Commit d440d01

Browse files
committed
Fix entrypoint lookup.
1 parent b72c614 commit d440d01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/driver.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,6 @@ const __llvm_initialized = Ref(false)
372372
end
373373
end
374374
end
375-
376-
# optimization may have replaced functions, so look the entry point up again
377-
entry = functions(ir)[entry_fn]
378375
end
379376

380377
if job.config.cleanup
@@ -390,6 +387,9 @@ const __llvm_initialized = Ref(false)
390387
end
391388
end
392389

390+
# optimization may have replaced functions, so look the entry point up again
391+
entry = functions(ir)[entry_fn]
392+
393393
# finish the module
394394
#
395395
# we want to finish the module after optimization, so we cannot do so

0 commit comments

Comments
 (0)