]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: don't resolve typedefs in -godefs mode
authorIan Lance Taylor <iant@golang.org>
Wed, 25 Jul 2018 22:24:27 +0000 (15:24 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 27 Jul 2018 16:46:42 +0000 (16:46 +0000)
commitead59f4bf368f13bbabea3f8a59f9f29ccdd3900
treecbcc83789fc37042f6d74771c085c7960b8f831a
parent911a5fda13d4b71c20cba25c45ddb9b9214d4183
cmd/cgo: don't resolve typedefs in -godefs mode

In -godefs mode any typedefs that appear in struct fields and the like
will presumably be defined in the input file. If we resolve to the
base type, those cross-references will not work. So for -godefs mode,
keep the Go 1.10 behavior and don't resolve the typedefs in a loop.

Fixes #26644

Change-Id: I48cf72d9eb5016353c43074e6aff6495af326f35
Reviewed-on: https://go-review.googlesource.com/125995
Reviewed-by: Keith Randall <khr@golang.org>
misc/cgo/testgodefs/fieldtypedef.go [new file with mode: 0644]
misc/cgo/testgodefs/test.bash
src/cmd/cgo/gcc.go