From: Clément Chigot Date: Tue, 23 Oct 2018 13:15:37 +0000 (+0200) Subject: cmd/compile/internal/ssa: fix TestStmtLines for AIX X-Git-Tag: go1.12beta1~632 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=64967ffe6d7e8a82c87db7c11f76117072e7aff7;p=gostls13.git cmd/compile/internal/ssa: fix TestStmtLines for AIX This commit adapts TestStmtLines for AIX operating system. Update #25893 Change-Id: I1c76bbd8fc679a66b65ecfbd1ed7745518064eae Reviewed-on: https://go-review.googlesource.com/c/144958 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/compile/internal/ssa/stmtlines_test.go b/src/cmd/compile/internal/ssa/stmtlines_test.go index c0fc7adab5..6fc0239ffe 100644 --- a/src/cmd/compile/internal/ssa/stmtlines_test.go +++ b/src/cmd/compile/internal/ssa/stmtlines_test.go @@ -1,6 +1,7 @@ package ssa_test import ( + "cmd/internal/xcoff" "debug/dwarf" "debug/elf" "debug/macho" @@ -25,6 +26,10 @@ func open(path string) (*dwarf.Data, error) { return fh.DWARF() } + if fh, err := xcoff.Open(path); err == nil { + return fh.DWARF() + } + return nil, fmt.Errorf("unrecognized executable format") }