diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-08-14 15:27:15 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-08-17 16:32:53 -0700 |
commit | f99dc8f89ddd5b93d9cd0a32ac22f60b211a39af (patch) | |
tree | 773d2ab46e9a8a78d5dfde4df81ae51f21dee806 /gcc/go/gofrontend/expressions.cc | |
parent | b00a83047574eb6f8d1e670ad439609125873506 (diff) | |
download | gcc-f99dc8f89ddd5b93d9cd0a32ac22f60b211a39af.zip gcc-f99dc8f89ddd5b93d9cd0a32ac22f60b211a39af.tar.gz gcc-f99dc8f89ddd5b93d9cd0a32ac22f60b211a39af.tar.bz2 |
compiler: export thunks referenced by inline functions
The test case is https://golang.org/cl/248637.
Fixes golang/go#40252
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/248638
Diffstat (limited to 'gcc/go/gofrontend/expressions.cc')
-rw-r--r-- | gcc/go/gofrontend/expressions.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index d295fd1..8bbc557 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -1635,16 +1635,15 @@ Func_descriptor_expression::do_get_backend(Translate_context* context) || no->name().find("equal") != std::string::npos)) is_exported_runtime = true; - bool is_referenced_by_inline = - no->is_function() && no->func_value()->is_referenced_by_inline(); - bool is_hidden = ((no->is_function() && no->func_value()->enclosing() != NULL) || (Gogo::is_hidden_name(no->name()) - && !is_exported_runtime - && !is_referenced_by_inline) + && !is_exported_runtime) || Gogo::is_thunk(no)); + if (no->is_function() && no->func_value()->is_referenced_by_inline()) + is_hidden = false; + bvar = context->backend()->immutable_struct(var_name, asm_name, is_hidden, false, btype, bloc); |