]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/objdump: make test independent of inlining
authorDavid Lazar <lazard@golang.org>
Sun, 19 Feb 2017 19:01:42 +0000 (14:01 -0500)
committerDavid Lazar <lazard@golang.org>
Sun, 19 Feb 2017 21:27:16 +0000 (21:27 +0000)
Fixes #19189.

Change-Id: Ice69216c7fc2eaeb3dbbdcd08a8284204c7f52ef
Reviewed-on: https://go-review.googlesource.com/37237
Run-TryBot: David Lazar <lazard@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/objdump/objdump_test.go
src/cmd/objdump/testdata/fmthello.go

index 10fc7164637d199ecc4ebb25905cc7dbbdb95a59..419be6717aa6cca724863e5960f7e9eadba42238 100644 (file)
@@ -60,7 +60,7 @@ var x86Need = []string{
        "fmthello.go:6",
        "TEXT main.main(SB)",
        "JMP main.main(SB)",
-       "CALL fmt.Println(SB)",
+       "CALL main.Println(SB)",
        "RET",
 }
 
@@ -68,7 +68,7 @@ var armNeed = []string{
        "fmthello.go:6",
        "TEXT main.main(SB)",
        //"B.LS main.main(SB)", // TODO(rsc): restore; golang.org/issue/9021
-       "BL fmt.Println(SB)",
+       "BL main.Println(SB)",
        "RET",
 }
 
@@ -76,7 +76,7 @@ var ppcNeed = []string{
        "fmthello.go:6",
        "TEXT main.main(SB)",
        "BR main.main(SB)",
-       "CALL fmt.Println(SB)",
+       "CALL main.Println(SB)",
        "RET",
 }
 
index 635db7ae6c12cddfaa837d9770a225b9225e4ada..e98268199d80ca184461aa32c370be43dfdc0caf 100644 (file)
@@ -3,5 +3,10 @@ package main
 import "fmt"
 
 func main() {
-       fmt.Println("hello, world")
+       Println("hello, world")
+}
+
+//go:noinline
+func Println(s string) {
+       fmt.Println(s)
 }