Skip to content

Commit 73b5d3f

Browse files
committed
Only import IRShow from Compiler when defined (pre-1.12)
1 parent a21193f commit 73b5d3f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/packagedef.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ using Compiler: Compiler as CC
99
using .CC:
1010
BasicBlock, CFG,
1111
compute_basic_blocks, construct_domtree, construct_postdomtree,
12-
nearest_common_dominator, postdominates,
13-
IRShow
12+
nearest_common_dominator, postdominates
13+
14+
@static if isdefined(CC, :IRShow)
15+
using .CC: IRShow
16+
else
17+
using Base: IRShow
18+
end
19+
1420
using Base.Meta: isexpr
1521

1622
const SSAValues = Union{Core.IR.SSAValue, JuliaInterpreter.SSAValue}

0 commit comments

Comments
 (0)