Skip to content

Commit

Permalink
Make use of Base.donotdelete if available
Browse files Browse the repository at this point in the history
  • Loading branch information
Keno committed Feb 8, 2022
1 parent 4da9aaf commit 56df665
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/execution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,9 @@ function generate_benchmark_definition(eval_module, out_vars, setup_vars, quote_
invocation = :($(Expr(:tuple, out_vars...)) = $(signature))
core_body = :($(core); $(returns))
end
if isdefined(Base, :donotdelete)
invocation = :(Base.donotdelete($invocation))
end
return Core.eval(eval_module, quote
@noinline $(signature_def) = begin $(core_body) end
@noinline function $(samplefunc)($(Expr(:tuple, quote_vars...)), __params::$BenchmarkTools.Parameters)
Expand Down Expand Up @@ -611,4 +614,4 @@ macro bprofile(args...)
$BenchmarkTools.Profile.clear()
$BenchmarkTools.@profile $BenchmarkTools.run($tmp)
end)
end
end

0 comments on commit 56df665

Please sign in to comment.