]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: identify the runtime pkg using myimportpath
authorMichael Matloob <matloob@golang.org>
Thu, 19 Nov 2015 19:09:33 +0000 (14:09 -0500)
committerMichael Matloob <matloob@golang.org>
Thu, 19 Nov 2015 19:50:03 +0000 (19:50 +0000)
commit45c3cf68b024e99ddf046e2a858452ea51d84749
tree3c587a3cfcc3d3bdaed9bde7bc4ce8d4719f2ba4
parent0e2c635788c58457ed8ac7b19e57a163c9e461c8
cmd/compile: identify the runtime pkg using myimportpath

Because there are now multiple packages that compose the runtime
we need to distinguish between the case where a runtime package
is being compiled versus the case the "runtime" package is being
compiled. In golang.org/cl/14204 I mistakenly used
  localpkg.Name == "runtime"
to check against the "runtime" package, but doing this would treat
a package with the path "foo.org/bar/runtime" as the runtime package.
The correct check is
  myimportpath == "runtime"
.

Change-Id: If90e95cef768d91206f2df1c06e27be876722e4e
Reviewed-on: https://go-review.googlesource.com/17059
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/compile/internal/gc/reflect.go