diff options
| author | Robert Griesemer <gri@golang.org> | 2016-12-08 15:19:47 -0800 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2016-12-09 00:35:07 +0000 |
| commit | eaca0e0529b780f4c862a97aa47008aa1b403adf (patch) | |
| tree | fffd2a59efa97fc2099b6ae6451386c4c983c847 /src/cmd/compile/internal/ssa/stackalloc.go | |
| parent | c10499b539b964d647a9153cbf44e9c39661c397 (diff) | |
| download | go-eaca0e0529b780f4c862a97aa47008aa1b403adf.tar.xz | |
[dev.inline] cmd/internal/src: introduce NoPos and use it instead Pos{}
Using a variable instead of a composite literal makes
the code independent of implementation changes of Pos.
Per David Lazar's suggestion.
Change-Id: I336967ac12a027c51a728a58ac6207cb5119af4a
Reviewed-on: https://go-review.googlesource.com/34148
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/stackalloc.go')
| -rw-r--r-- | src/cmd/compile/internal/ssa/stackalloc.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/stackalloc.go b/src/cmd/compile/internal/ssa/stackalloc.go index 599dc934f1..f39d7f47e4 100644 --- a/src/cmd/compile/internal/ssa/stackalloc.go +++ b/src/cmd/compile/internal/ssa/stackalloc.go @@ -40,7 +40,7 @@ func newStackAllocState(f *Func) *stackAllocState { return new(stackAllocState) } if s.f != nil { - f.Config.Fatalf(src.Pos{}, "newStackAllocState called without previous free") + f.Config.Fatalf(src.NoPos, "newStackAllocState called without previous free") } return s } |
