mirror of
https://github.com/golang/go
synced 2024-11-24 23:57:57 -07:00
gc: never crash during a debugging print
TBR=lvd CC=golang-dev https://golang.org/cl/5686063
This commit is contained in:
parent
818e3cdb09
commit
6c7daca236
@ -1346,15 +1346,11 @@ nodefmt(Fmt *f, Node *n)
|
||||
Type *t;
|
||||
|
||||
t = n->type;
|
||||
if(n->orig == N) {
|
||||
n->orig = n;
|
||||
fatal("node with no orig %N", n);
|
||||
}
|
||||
|
||||
// we almost always want the original, except in export mode for literals
|
||||
// this saves the importer some work, and avoids us having to redo some
|
||||
// special casing for package unsafe
|
||||
if(fmtmode != FExp || n->op != OLITERAL)
|
||||
if((fmtmode != FExp || n->op != OLITERAL) && n->orig != N)
|
||||
n = n->orig;
|
||||
|
||||
if(f->flags&FmtLong && t != T) {
|
||||
|
Loading…
Reference in New Issue
Block a user