mirror of
https://github.com/golang/go
synced 2024-11-23 22:00:11 -07: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:
parent
c3c84a2544
commit
337b7e7e3b
@ -480,6 +480,8 @@ func (s *state) expr(n *Node) *ssa.Value {
|
||||
return s.constInt(n.Type, Mpgetfix(n.Val().U.(*Mpint)))
|
||||
case CTSTR, CTBOOL:
|
||||
return s.entryNewValue0A(ssa.OpConst, n.Type, n.Val().U)
|
||||
case CTNIL:
|
||||
return s.entryNewValue0(ssa.OpConst, n.Type)
|
||||
default:
|
||||
s.Unimplementedf("unhandled OLITERAL %v", n.Val().Ctype())
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user