1
0
mirror of https://github.com/golang/go synced 2024-11-23 23:20:08 -07:00

cmd/internal/obj: remove useless Trimpath field and fix users

http://golang.org/cl/7623 refactored how line history works and
introduced a new TrimPathPrefix field to replace the existing Trimpath
field, but never removed the latter or updated its users.

Fixes #10503.

Change-Id: Ief90a55b6cef2e8062b59856a4c7dcc0df01d3f2
Reviewed-on: https://go-review.googlesource.com/9113
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Matthew Dempsky 2015-04-19 20:57:41 -07:00
parent b016eba489
commit e7ffafdb6e
4 changed files with 3 additions and 4 deletions

View File

@ -40,7 +40,7 @@ func main() {
if *flags.PrintOut {
ctxt.Debugasm = 1
}
ctxt.Trimpath = *flags.TrimPath
ctxt.LineHist.TrimPathPrefix = *flags.TrimPath
ctxt.Flag_dynlink = *flags.Dynlink
if *flags.Shared || *flags.Dynlink {
ctxt.Flag_shared = 1

View File

@ -192,7 +192,7 @@ func Main() {
flag.Var((*count)(&debug['S']), "S", "print assembly and machine code")
flag.Var((*count)(&debug['m']), "m", "debug preprocessor macros")
flag.StringVar(&outfile, "o", "", "file: set output file")
flag.StringVar(&Ctxt.Trimpath, "trimpath", "", "prefix: remove prefix from recorded source file paths")
flag.StringVar(&Ctxt.LineHist.TrimPathPrefix, "trimpath", "", "prefix: remove prefix from recorded source file paths")
flag.Parse()

View File

@ -213,7 +213,7 @@ func Main() {
obj.Flagcount("r", "debug generated wrappers", &Debug['r'])
obj.Flagcount("race", "enable race detector", &flag_race)
obj.Flagcount("s", "warn about composite literals that can be simplified", &Debug['s'])
obj.Flagstr("trimpath", "prefix: remove prefix from recorded source file paths", &Ctxt.Trimpath)
obj.Flagstr("trimpath", "prefix: remove prefix from recorded source file paths", &Ctxt.LineHist.TrimPathPrefix)
obj.Flagcount("u", "reject unsafe code", &safemode)
obj.Flagcount("v", "increase debug verbosity", &Debug['v'])
obj.Flagcount("w", "debug type checking", &Debug['w'])

View File

@ -439,7 +439,6 @@ type Link struct {
Bso *Biobuf
Pathname string
Windows int32
Trimpath string
Goroot string
Goroot_final string
Enforce_data_order int32