]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.ssa] cmd/compile/internal/gc: avoid generating test binary file
authorKeith Randall <khr@golang.org>
Tue, 8 Sep 2015 23:23:50 +0000 (16:23 -0700)
committerKeith Randall <khr@golang.org>
Wed, 9 Sep 2015 04:05:09 +0000 (04:05 +0000)
Using the main package causes a binary to be generated.  That binary
clutters up git listings.

Use a non-main package instead, so the results of a successful
compilation are thrown away.

Change-Id: I3ac91fd69ad297a5c0fe035c22fdef290b7dfbc4
Reviewed-on: https://go-review.googlesource.com/14399
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/compile/internal/gc/testdata/deferNoReturn_ssa.go

index 171f5837bc256bb9077227360fd2fb47d8978325..7578dd56f22f516fa00438747d6658e6483bff68 100644 (file)
@@ -7,7 +7,7 @@
 // Test that a defer in a function with no return
 // statement will compile correctly.
 
-package main
+package foo
 
 func deferNoReturn_ssa() {
        defer func() { println("returned") }()
@@ -15,7 +15,3 @@ func deferNoReturn_ssa() {
                println("loop")
        }
 }
-
-func main() {
-       deferNoReturn_ssa()
-}