aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2023-10-20 10:11:48 -0700
committerIan Lance Taylor <iant@golang.org>2024-02-02 15:03:47 -0800
commite52d31804a910642c9817bdd400c290a593c98ef (patch)
tree9c112848def6016f47adb1986022989763d0a594 /gcc
parentfbb569315a291d2d5b32ad0fdaf0c42da9f5e93b (diff)
downloadgcc-e52d31804a910642c9817bdd400c290a593c98ef.zip
gcc-e52d31804a910642c9817bdd400c290a593c98ef.tar.gz
gcc-e52d31804a910642c9817bdd400c290a593c98ef.tar.bz2
compiler: export the type "any" as a builtin
Otherwise we can't tell the difference between builtin type "any" and a locally defined type "any". This will require updates to the gccgo export data parsers in the main Go repo and the x/tools repo. These updates are https://go.dev/cl/537195 and https://go.dev/cl/537215. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/536715
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--gcc/go/gofrontend/export.cc1
-rw-r--r--gcc/go/gofrontend/export.h3
-rw-r--r--gcc/go/gofrontend/import.cc1
4 files changed, 5 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index c2a6032..18281c6 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-ddf3758e4a45ca2816fb68f3e4224501a3c4c438
+7ab229670f7dad1d79f33929f9a4f8e6e4a71526
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/export.cc b/gcc/go/gofrontend/export.cc
index 7373dee..40f6d5d 100644
--- a/gcc/go/gofrontend/export.cc
+++ b/gcc/go/gofrontend/export.cc
@@ -1661,6 +1661,7 @@ Export::register_builtin_types(Gogo* gogo)
this->register_builtin_type(gogo, "error", BUILTIN_ERROR);
this->register_builtin_type(gogo, "byte", BUILTIN_BYTE);
this->register_builtin_type(gogo, "rune", BUILTIN_RUNE);
+ this->register_builtin_type(gogo, "any", BUILTIN_ANY);
}
// Register one builtin type in the export table.
diff --git a/gcc/go/gofrontend/export.h b/gcc/go/gofrontend/export.h
index 1f61343..be117ec 100644
--- a/gcc/go/gofrontend/export.h
+++ b/gcc/go/gofrontend/export.h
@@ -51,8 +51,9 @@ enum Builtin_code
BUILTIN_ERROR = -19,
BUILTIN_BYTE = -20,
BUILTIN_RUNE = -21,
+ BUILTIN_ANY = -22,
- SMALLEST_BUILTIN_CODE = -21
+ SMALLEST_BUILTIN_CODE = -22
};
// Export data version number. New export data is written with the
diff --git a/gcc/go/gofrontend/import.cc b/gcc/go/gofrontend/import.cc
index 21691fa..3cc8a72 100644
--- a/gcc/go/gofrontend/import.cc
+++ b/gcc/go/gofrontend/import.cc
@@ -1408,6 +1408,7 @@ Import::register_builtin_types(Gogo* gogo)
this->register_builtin_type(gogo, "error", BUILTIN_ERROR);
this->register_builtin_type(gogo, "byte", BUILTIN_BYTE);
this->register_builtin_type(gogo, "rune", BUILTIN_RUNE);
+ this->register_builtin_type(gogo, "any", BUILTIN_ANY);
}
// Register a single builtin type.