aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/runtime.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2012-01-20 15:42:38 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-01-20 15:42:38 +0000
commit7c0434e5770960aa20de0fb0d0ace91e1757438a (patch)
treedbda0920b40eb4619acf931b7375d151ac4f323a /gcc/go/gofrontend/runtime.cc
parent0ab6e1eceb167b931222d4d092acaca60f88a7a0 (diff)
downloadgcc-7c0434e5770960aa20de0fb0d0ace91e1757438a.zip
gcc-7c0434e5770960aa20de0fb0d0ace91e1757438a.tar.gz
gcc-7c0434e5770960aa20de0fb0d0ace91e1757438a.tar.bz2
compiler: Handle recursive interfaces.
* go-gcc.cc (Gcc_backend::placeholder_struct_type): Permit name to be empty. (Gcc_backend::set_placeholder_struct_type): Likewise. From-SVN: r183340
Diffstat (limited to 'gcc/go/gofrontend/runtime.cc')
-rw-r--r--gcc/go/gofrontend/runtime.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/runtime.cc b/gcc/go/gofrontend/runtime.cc
index bffefbb..7893d45 100644
--- a/gcc/go/gofrontend/runtime.cc
+++ b/gcc/go/gofrontend/runtime.cc
@@ -151,12 +151,14 @@ runtime_function_type(Runtime_function_type bft)
Typed_identifier_list* methods = new Typed_identifier_list();
Type* mtype = Type::make_function_type(NULL, NULL, NULL, bloc);
methods->push_back(Typed_identifier("x", mtype, bloc));
- t = Type::make_interface_type(methods, bloc);
+ Interface_type* it = Type::make_interface_type(methods, bloc);
+ it->finalize_methods();
+ t = it;
}
break;
case RFT_EFACE:
- t = Type::make_interface_type(NULL, bloc);
+ t = Type::make_empty_interface_type(bloc);
break;
case RFT_FUNC_PTR: