mirror of
https://github.com/golang/go
synced 2024-11-07 18:16:34 -07:00
cmd/compile: remove dead code
This struct, global var and method are not used anywhere. Change-Id: I83d9e93041a46904064d0fa88ab655a50149c747 Reviewed-on: https://go-review.googlesource.com/126397 Run-TryBot: Yury Smolsky <yury@smolsky.by> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
af29e98390
commit
0b7d87e6f9
@ -39,22 +39,6 @@ type Line struct {
|
|||||||
Line int
|
Line int
|
||||||
}
|
}
|
||||||
|
|
||||||
type File struct {
|
|
||||||
lines []string
|
|
||||||
}
|
|
||||||
|
|
||||||
var fileCache = map[string]*File{}
|
|
||||||
|
|
||||||
func (f *File) Get(lineno int) (string, bool) {
|
|
||||||
if f == nil {
|
|
||||||
return "", false
|
|
||||||
}
|
|
||||||
if lineno-1 < 0 || lineno-1 >= len(f.lines) {
|
|
||||||
return "", false
|
|
||||||
}
|
|
||||||
return f.lines[lineno-1], true
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestStmtLines(t *testing.T) {
|
func TestStmtLines(t *testing.T) {
|
||||||
if runtime.GOOS == "plan9" {
|
if runtime.GOOS == "plan9" {
|
||||||
t.Skip("skipping on plan9; no DWARF symbol table in executables")
|
t.Skip("skipping on plan9; no DWARF symbol table in executables")
|
||||||
|
Loading…
Reference in New Issue
Block a user