aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Donizetti <alb.donizetti@gmail.com>2016-09-29 18:46:24 +0200
committerBrad Fitzpatrick <bradfitz@golang.org>2016-09-29 17:25:28 +0000
commitd58219e50ba1fd9bf577be7332bdcabe0ef8b7d5 (patch)
tree2c59b5587bf7c7c262f81de9ac24ef5b977f5da2
parentc5434f2973a87acff76bac359236e690d632ce95 (diff)
downloadgo-d58219e50ba1fd9bf577be7332bdcabe0ef8b7d5.tar.xz
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>
-rw-r--r--src/cmd/compile/internal/gc/const.go13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/cmd/compile/internal/gc/const.go b/src/cmd/compile/internal/gc/const.go
index 39c662ffc8..756286b3fa 100644
--- a/src/cmd/compile/internal/gc/const.go
+++ b/src/cmd/compile/internal/gc/const.go
@@ -112,19 +112,6 @@ func (v Val) Interface() interface{} {
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.
// n must be an integer or rune constant.
func (n *Node) Int64() int64 {