]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.ssa] cmd/compile: fix dev.ssa build
authorJosh Bleecher Snyder <josharian@gmail.com>
Mon, 17 Aug 2015 07:18:31 +0000 (00:18 -0700)
committerDavid Chase <drchase@google.com>
Mon, 17 Aug 2015 15:01:55 +0000 (15:01 +0000)
Broken by CL 13472.

Change-Id: Ib65331b291c8fab4238ca91e085779bb954d70e8
Reviewed-on: https://go-review.googlesource.com/13638
Reviewed-by: David Chase <drchase@google.com>
src/cmd/internal/obj/obj.go

index 6229bbb288c2db7e00f1c9b4d5d349ff5362944d..937e3b981244c4f714b475e4e35e5b8a6375c7e4 100644 (file)
@@ -229,6 +229,10 @@ func (h *LineHist) LineString(lineno int) string {
        text := fmt.Sprintf("%s:%d", filename, stk.fileLineAt(lineno))
        if stk.Directive && stk.Parent != nil {
                stk = stk.Parent
+               filename = stk.File
+               if h.PrintFilenameOnly {
+                       filename = filepath.Base(filename)
+               }
                text += fmt.Sprintf("[%s:%d]", filename, stk.fileLineAt(lineno))
        }
        const showFullStack = false // was used by old C compilers