Skip to content

Commit 865f80e

Browse files
authored
Fix @test_inlined on nightly (#1112)
see
1 parent 122bebe commit 865f80e

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/testutil.jl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,17 @@ macro test_inlined(ex, should_inline=true)
5555
ex_orig = ex
5656
ex = macroexpand(@__MODULE__, :(@code_llvm $ex))
5757
expr = quote
58-
code_str = sprint() do io
59-
code_llvm(io, $(map(esc, ex.args[2:end])...))
58+
@static if hasfield(Base.CodegenParams, :safepoint_on_entry)
59+
code_str = let params = Base.CodegenParams(safepoint_on_entry=false),
60+
f = $(esc(ex.args[2])),
61+
t = $(esc(ex.args[3]))
62+
d = InteractiveUtils._dump_function(f, t, false, false, true, false, :att, true, :none, false, params)
63+
sprint(print, d)
64+
end
65+
else
66+
code_str = sprint() do io
67+
code_llvm(io, $(map(esc, ex.args[2:end])...))
68+
end
6069
end
6170
# Crude detection of call instructions remaining within what should be
6271
# fully inlined code.

0 commit comments

Comments
 (0)