diff --git a/src/ir/wrap.jl b/src/ir/wrap.jl index 89a8a8b..2e8710f 100644 --- a/src/ir/wrap.jl +++ b/src/ir/wrap.jl @@ -58,7 +58,11 @@ function IRCode(ir::IR) sps = VERSION > v"1.2-" ? [] : Core.svec() @static if VERSION > v"1.6-" - stmtinfo = Any[nothing for _ in 1:length(length(stmts))] + @static if isdefined(Core.Compiler, :CallInfo) + stmtinfo = Core.Compiler.CallInfo[Core.Compiler.NoCallInfo() for _ in 1:length(stmts)] + else + stmtinfo = Any[nothing for _ in 1:length(stmts)] + end stmts = InstructionStream(stmts, types, stmtinfo, lines, flags) meta = @static VERSION < v"1.9.0-DEV.472" ? [] : Expr[] IRCode(stmts, cfg, ir.lines, ir.blocks[1].argtypes, meta, sps)