aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-03-16 23:05:44 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-03-16 23:05:44 +0000
commit5133f00ef8baab894d92de1e8b8baae59815a8b6 (patch)
tree44176975832a3faf1626836e70c97d5edd674122 /gcc/go
parentf617201f55938fc89b532f2240bdf77bea946471 (diff)
downloadgcc-5133f00ef8baab894d92de1e8b8baae59815a8b6.zip
gcc-5133f00ef8baab894d92de1e8b8baae59815a8b6.tar.gz
gcc-5133f00ef8baab894d92de1e8b8baae59815a8b6.tar.bz2
Update to current version of Go library (revision 94d654be2064).
From-SVN: r171076
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/gofrontend/types.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc
index 0db5994..2eecafd 100644
--- a/gcc/go/gofrontend/types.cc
+++ b/gcc/go/gofrontend/types.cc
@@ -1078,7 +1078,7 @@ Type::make_type_descriptor_type()
bloc);
Struct_type* type_descriptor_type =
- Type::make_builtin_struct_type(9,
+ Type::make_builtin_struct_type(10,
"Kind", uint8_type,
"align", uint8_type,
"fieldAlign", uint8_type,
@@ -1087,7 +1087,9 @@ Type::make_type_descriptor_type()
"hashfn", hashfn_type,
"equalfn", equalfn_type,
"string", pointer_string_type,
- "", pointer_uncommon_type);
+ "", pointer_uncommon_type,
+ "ptrToThis",
+ pointer_type_descriptor_type);
Named_type* named = Type::make_builtin_named_type("commonType",
type_descriptor_type);
@@ -1260,6 +1262,16 @@ Type::type_descriptor_constructor(Gogo* gogo, int runtime_type_kind,
}
++p;
+ gcc_assert(p->field_name() == "ptrToThis");
+ if (name == NULL)
+ vals->push_back(Expression::make_nil(bloc));
+ else
+ {
+ Type* pt = Type::make_pointer_type(name);
+ vals->push_back(Expression::make_type_descriptor(pt, bloc));
+ }
+
+ ++p;
gcc_assert(p == fields->end());
mpz_clear(iv);