Commit 533f30b9 authored by Robert Griesemer's avatar Robert Griesemer

cmd/compile: exit early if oldname doesn't find a name

Change-Id: I59ce1b40bc3472cc92a9a0a9fbd32342e0b945ad
Reviewed-on: https://go-review.googlesource.com/20152Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
parent c41608f4
...@@ -388,6 +388,7 @@ func oldname(s *Sym) *Node { ...@@ -388,6 +388,7 @@ func oldname(s *Sym) *Node {
n = newname(s) n = newname(s)
n.Op = ONONAME n.Op = ONONAME
n.Name.Iota = iota_ // save current iota value in const declarations n.Name.Iota = iota_ // save current iota value in const declarations
return n
} }
if Curfn != nil && n.Op == ONAME && n.Name.Funcdepth > 0 && n.Name.Funcdepth != Funcdepth { if Curfn != nil && n.Op == ONAME && n.Name.Funcdepth > 0 && n.Name.Funcdepth != Funcdepth {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment