aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2015-10-30 23:00:06 +0000
committerIan Lance Taylor <iant@google.com>2015-10-30 23:00:06 +0000
commitbf9783a55abda164350045ac484f3c3d413bba1b (patch)
treeedbd4f6066e7a9f37db7f91ad8437c55c90b359f
parent912b475de95177aead86a70f3a96a37012bb7ce3 (diff)
compiler: Create pointer type for all types with methods.
Reviewed-on: https://go-review.googlesource.com/16522 git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@229612 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--gcc/go/gofrontend/types.cc8
2 files changed, 7 insertions, 3 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 987bd684c59..5d35b04a15c 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-85994dd0a88d1b24b2ddfc9c9ab22ee16c9e8b54
+16f69a4007a1903da4055a496882b514e05f45f3
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/types.cc b/gcc/go/gofrontend/types.cc
index b4620ff0c86..822037d1bbf 100644
--- a/gcc/go/gofrontend/types.cc
+++ b/gcc/go/gofrontend/types.cc
@@ -2064,11 +2064,15 @@ Type::type_descriptor_constructor(Gogo* gogo, int runtime_type_kind,
++p;
go_assert(p->is_field_name("ptrToThis"));
- if (name == NULL)
+ if (name == NULL && methods == NULL)
vals->push_back(Expression::make_nil(bloc));
else
{
- Type* pt = Type::make_pointer_type(name);
+ Type* pt;
+ if (name != NULL)
+ pt = Type::make_pointer_type(name);
+ else
+ pt = Type::make_pointer_type(this);
vals->push_back(Expression::make_type_descriptor(pt, bloc));
}