]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: mark plugin-exported types as used in interface
authorCherry Zhang <cherryyz@google.com>
Fri, 13 Nov 2020 19:42:45 +0000 (14:42 -0500)
committerCherry Zhang <cherryyz@google.com>
Fri, 13 Nov 2020 22:01:37 +0000 (22:01 +0000)
commit86954d5246339231dc0c45f5547c37a1c3650264
tree6ba5c965d7273870bd134f928c6749799498bcd5
parentf423d616b15302730c1b737a3b22afca315a7fbe
cmd/compile: mark plugin-exported types as used in interface

Plugin exports symbols as interfaces. Mark their types as used in
interfaces, so their methods will be kept alive by the linker.

Fixes #42579.

Change-Id: If1b5aacc21510c20c25f88bb131bca61db6f1d56
Reviewed-on: https://go-review.googlesource.com/c/go/+/269819
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
misc/cgo/testplugin/plugin_test.go
misc/cgo/testplugin/testdata/method/main.go [new file with mode: 0644]
misc/cgo/testplugin/testdata/method/plugin.go [new file with mode: 0644]
src/cmd/compile/internal/gc/reflect.go