mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: delete unused IntLiteral function
IntLiteral was only called by the gins functions in
cmd/compile/internal/{arm64,mips64,ppc64}/gsubr.go
but CL 29220 (cmd/compile: remove gins) deleted them,
so IntLiteral is now unused.
Change-Id: I2652b6d2ace6fdadc1982f65e749f3982513371e
Reviewed-on: https://go-review.googlesource.com/29996
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
c5434f2973
commit
d58219e50b
1 changed files with 0 additions and 13 deletions
|
|
@ -112,19 +112,6 @@ func (v Val) Interface() interface{} {
|
||||||
|
|
||||||
type NilVal struct{}
|
type NilVal struct{}
|
||||||
|
|
||||||
// IntLiteral returns the Node's literal value as an integer.
|
|
||||||
func (n *Node) IntLiteral() (x int64, ok bool) {
|
|
||||||
switch {
|
|
||||||
case n == nil:
|
|
||||||
return
|
|
||||||
case Isconst(n, CTINT):
|
|
||||||
return n.Int64(), true
|
|
||||||
case Isconst(n, CTBOOL):
|
|
||||||
return int64(obj.Bool2int(n.Bool())), true
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Int64 returns n as an int64.
|
// Int64 returns n as an int64.
|
||||||
// n must be an integer or rune constant.
|
// n must be an integer or rune constant.
|
||||||
func (n *Node) Int64() int64 {
|
func (n *Node) Int64() int64 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue