]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj: remove useless Trimpath field and fix users
authorMatthew Dempsky <mdempsky@google.com>
Mon, 20 Apr 2015 03:57:41 +0000 (20:57 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 20 Apr 2015 20:46:06 +0000 (20:46 +0000)
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>

src/cmd/asm/main.go
src/cmd/internal/asm/asm.go
src/cmd/internal/gc/lex.go
src/cmd/internal/obj/link.go

index 9b07dd22e13eb0631ff56699a9c0714915d3f0be..48315d08ce36f06224218d27f41b23de73d8ef6a 100644 (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
index b67b4d717c1badaa9016ca64c551a2d89c91f553..90a4781e7b8bce957485213ab60b4f1488fb89a4 100644 (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()
 
index 8266e5e5f68c425a975ea5144ad599d6b3c03430..3ff550131b84101c8fb201af53f0b429c5bc9c4c 100644 (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'])
index c7c5abe00297cf5367c5412abb55508294261143..6be5a816c29fe678a8f614d1b4c25aac5b2b0b70 100644 (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