1
0
mirror of https://github.com/golang/go synced 2024-10-05 20:21:21 -06:00

[dev.ssa] cmd/compile: handle OLITERAL nil expressions

Change-Id: I02b8fb277b486eaf0916ddcd8f28c062d4022d4b
Reviewed-on: https://go-review.googlesource.com/12150
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Brad Fitzpatrick 2015-07-13 17:30:42 -06:00
parent c3c84a2544
commit 337b7e7e3b

View File

@ -480,6 +480,8 @@ func (s *state) expr(n *Node) *ssa.Value {
return s.constInt(n.Type, Mpgetfix(n.Val().U.(*Mpint))) return s.constInt(n.Type, Mpgetfix(n.Val().U.(*Mpint)))
case CTSTR, CTBOOL: case CTSTR, CTBOOL:
return s.entryNewValue0A(ssa.OpConst, n.Type, n.Val().U) return s.entryNewValue0A(ssa.OpConst, n.Type, n.Val().U)
case CTNIL:
return s.entryNewValue0(ssa.OpConst, n.Type)
default: default:
s.Unimplementedf("unhandled OLITERAL %v", n.Val().Ctype()) s.Unimplementedf("unhandled OLITERAL %v", n.Val().Ctype())
return nil return nil