]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: don't update each call in place
authorIan Lance Taylor <iant@golang.org>
Fri, 2 Nov 2018 05:06:51 +0000 (22:06 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 2 Nov 2018 05:35:56 +0000 (05:35 +0000)
commita70a2a8ad69f481d5fcaf9e006e224fbab7df754
tree9cc3e28af1388df55d36e2eb6cde0085acb88447
parent2182bb097dc5cacf556f89e4e7d2cfdd96882237
cmd/cgo: don't update each call in place

Updating each call in place broke when there were multiple cgo calls
used as arguments to another cgo call where some required rewriting.
Instead, rewrite calls to strings via the existing mangling mechanism,
and only substitute the top level call in place.

Fixes #28540

Change-Id: Ifd66f04c205adc4ad6dd5ee8e79e57dce17e86bb
Reviewed-on: https://go-review.googlesource.com/c/146860
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
misc/cgo/test/twoargs.go [new file with mode: 0644]
src/cmd/cgo/gcc.go
src/cmd/cgo/main.go