1
0
mirror of https://github.com/golang/go synced 2024-11-18 19:54:44 -07:00

cmd/compile: stop exporting OPTRLIT

Removes TODO left by previous commit to appease toolstash.

Change-Id: I5c0bf25f21ba5c0abe3b1b2ed0b17c604717f39b
Reviewed-on: https://go-review.googlesource.com/c/go/+/197121
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Matthew Dempsky 2019-09-25 00:26:06 -07:00
parent 00b773a4a9
commit fd5ba54f7c
2 changed files with 3 additions and 6 deletions

View File

@ -1181,10 +1181,9 @@ func (w *exportWriter) expr(n *Node) {
// should have been resolved by typechecking - handled by default case
case OPTRLIT:
w.op(OPTRLIT) // TODO(mdempsky): Replace with OADDR.
w.op(OADDR)
w.pos(n.Pos)
w.expr(n.Left)
w.bool(false)
case OSTRUCTLIT:
w.op(OSTRUCTLIT)

View File

@ -801,10 +801,8 @@ func (r *importReader) node() *Node {
// case OCLOSURE:
// unimplemented
case OPTRLIT:
n := nodl(r.pos(), OADDR, r.expr(), nil)
_ = r.bool()
return n
// case OPTRLIT:
// unreachable - mapped to case OADDR below by exporter
case OSTRUCTLIT:
// TODO(mdempsky): Export position information for OSTRUCTKEY nodes.