Skip to content

Commit fc3fe4f

Browse files
JeffBezansonKenovtjnash
authored
fix IR showing not to show TypedSlot type twice (#38961)
* fix IR showing not to show TypedSlot type twice * Update base/compiler/ssair/show.jl Co-authored-by: Jameson Nash <vtjnash@gmail.com> Co-authored-by: Keno Fischer <keno@juliacomputing.com> Co-authored-by: Jameson Nash <vtjnash@gmail.com>
1 parent 4c4aaff commit fc3fe4f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

base/compiler/ssair/show.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ function print_stmt(io::IO, idx::Int, @nospecialize(stmt), used::BitSet, maxleng
6464
show_unquoted_phinode(io, stmt, indent, "#")
6565
elseif stmt isa GotoIfNot
6666
show_unquoted_gotoifnot(io, stmt, indent, "#")
67+
elseif stmt isa TypedSlot
68+
# call `show` with the type set to Any so it will not be shown, since
69+
# we will show the type ourselves.
70+
show_unquoted(io, SlotNumber(stmt.id), indent, show_type ? prec_decl : 0)
6771
# everything else in the IR, defer to the generic AST printer
6872
else
6973
show_unquoted(io, stmt, indent, show_type ? prec_decl : 0)

0 commit comments

Comments
 (0)