aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/util.go
diff options
context:
space:
mode:
authorgriesemer <gri@golang.org>2017-11-10 11:38:51 -0800
committerRobert Griesemer <gri@golang.org>2017-11-13 16:47:41 +0000
commitca2a886cbade477e2c7cf09cdac604b757fb70a9 (patch)
treea53caa12f75272cad04d04bd5ea1ffd3dea576ef /src/cmd/internal/obj/util.go
parent2c00dea18b4a62fbf0bc11c85e4d9b91a314381f (diff)
downloadgo-ca2a886cbade477e2c7cf09cdac604b757fb70a9.tar.xz
cmd/compile: record original and absolute file names for line directives
Also, with this change, error locations don't print absolute positions in [] brackets following positions relative to line directives. To get the absolute positions as well, specify the -L flag. Fixes #22660. Change-Id: I9ecfa254f053defba9c802222874155fa12fee2c Reviewed-on: https://go-review.googlesource.com/77090 Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd/internal/obj/util.go')
-rw-r--r--src/cmd/internal/obj/util.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/internal/obj/util.go b/src/cmd/internal/obj/util.go
index f1ac1a8808..867c69f3ef 100644
--- a/src/cmd/internal/obj/util.go
+++ b/src/cmd/internal/obj/util.go
@@ -15,7 +15,7 @@ const REG_NONE = 0
// Line returns a string containing the filename and line number for p
func (p *Prog) Line() string {
- return p.Ctxt.OutermostPos(p.Pos).Format(false)
+ return p.Ctxt.OutermostPos(p.Pos).Format(false, true)
}
// LineNumber returns a string containing the line number for p's position