diff options
Diffstat (limited to 'src/cmd/compile/internal/ir/fmt.go')
-rw-r--r-- | src/cmd/compile/internal/ir/fmt.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/ir/fmt.go b/src/cmd/compile/internal/ir/fmt.go index d19fe453ef..29505357cc 100644 --- a/src/cmd/compile/internal/ir/fmt.go +++ b/src/cmd/compile/internal/ir/fmt.go @@ -386,7 +386,7 @@ func stmtFmt(n Node, s fmt.State) { case OTAILCALL: n := n.(*TailCallStmt) - fmt.Fprintf(s, "tailcall %v", n.Target) + fmt.Fprintf(s, "tailcall %v", n.Call) case OINLMARK: n := n.(*InlineMarkStmt) @@ -559,7 +559,7 @@ func exprFmt(n Node, s fmt.State, prec int) { } nprec := OpPrec[n.Op()] - if n.Op() == OTYPE && n.Type().IsPtr() { + if n.Op() == OTYPE && n.Type() != nil && n.Type().IsPtr() { nprec = OpPrec[ODEREF] } @@ -1147,6 +1147,7 @@ func dumpNodeHeader(w io.Writer, n Node) { } // TODO(mdempsky): Print line pragma details too. file := filepath.Base(pos.Filename()) + // Note: this output will be parsed by ssa/html.go:(*HTMLWriter).WriteAST. Keep in sync. fmt.Fprintf(w, "%s:%d:%d", file, pos.Line(), pos.Col()) } } |