diff options
author | Alessandro Arzilli <alessandro.arzilli@gmail.com> | 2018-09-25 11:52:24 +0200 |
---|---|---|
committer | Than McIntosh <thanm@google.com> | 2018-09-27 11:58:35 +0000 |
commit | 1c8943bd59157878141faab0c93848f45d3d51d1 (patch) | |
tree | 6b37776f5597d20dce5ec90f71ebe7fb43f29703 /src/cmd/compile/internal/ssa/stmtlines_test.go | |
parent | 4ba4c5ae795f30f167faef7c15dba3e32afc53d0 (diff) | |
download | go-1c8943bd59157878141faab0c93848f45d3d51d1.tar.gz go-1c8943bd59157878141faab0c93848f45d3d51d1.zip |
cmd/link: move DIE of global variables to their compile unit
The DIEs for global variables were all assigned to the first emitted
compile unit in debug_info, regardless of what it was. Move them
instead to their respective compile units.
Change-Id: If794fa0ba4702f5b959c6e8c16119b16e7ecf6d8
Reviewed-on: https://go-review.googlesource.com/137235
Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/stmtlines_test.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/stmtlines_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/stmtlines_test.go b/src/cmd/compile/internal/ssa/stmtlines_test.go index 1081f83f6d..c0fc7adab5 100644 --- a/src/cmd/compile/internal/ssa/stmtlines_test.go +++ b/src/cmd/compile/internal/ssa/stmtlines_test.go @@ -62,6 +62,9 @@ func TestStmtLines(t *testing.T) { if pkgname == "runtime" { continue } + if e.Val(dwarf.AttrStmtList) == nil { + continue + } lrdr, err := dw.LineReader(e) must(err) |