diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-03-15 16:58:14 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-03-15 16:58:14 +0000 |
commit | 167727579b725adba2e262129f664db474445273 (patch) | |
tree | 39f7aff66f510e5e9c00fc8d9165d0497638f82c | |
parent | d81beb31c684350e80a3bcfdc9bbad3323180dc3 (diff) | |
download | gcc-167727579b725adba2e262129f664db474445273.zip gcc-167727579b725adba2e262129f664db474445273.tar.gz gcc-167727579b725adba2e262129f664db474445273.tar.bz2 |
compiler: preserve nointerface property when inlining methods
When an inline function (with body) is imported from another package,
make that the "nointerface" property (if set) is preserved.
Fixes golang/go#30862.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167742
From-SVN: r269713
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/gogo.cc | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 18050a2..13c12e7 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -a99959e6a4a899cfcc4d46e6b54da15d23c58a14 +cc70be24502faeffefb66fd0abeb7f20a6c7792a The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index 757758e..a9630b2 100644 --- a/gcc/go/gofrontend/gogo.cc +++ b/gcc/go/gofrontend/gogo.cc @@ -6899,6 +6899,8 @@ Function_declaration::import_function_body(Gogo* gogo, Named_object* no) if (fntype->is_method()) { + if (this->nointerface()) + fn->set_nointerface(); const Typed_identifier* receiver = fntype->receiver(); Variable* recv_param = new Variable(receiver->type(), NULL, false, true, true, start_loc); |