]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: panic if HeadType is not set
authorCherry Zhang <cherryyz@google.com>
Fri, 24 Apr 2020 17:02:37 +0000 (13:02 -0400)
committerCherry Zhang <cherryyz@google.com>
Fri, 24 Apr 2020 17:22:57 +0000 (17:22 +0000)
commit880ef2da7b81fe2e4e9fb75f4677377eeba70d1e
treef5c19ee74b195d2f8e95149f853c459d6a8fe98c
parentf2d8da1a353b493548e211b06fdf47bd998ad4b6
[dev.link] cmd/link: panic if HeadType is not set

In the code there are conditions like !ctxt.IsDarwin(). This will
accidentally be true if HeadType is not yet set. Panic when
HeadType is not set, to catch errors.

Change-Id: Ic891123f27f0276fff5a4b5d29e5b1f7ebbb94ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/229869
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/link/internal/ld/target.go