From: Ian Lance Taylor Date: Thu, 1 Dec 2011 18:57:10 +0000 (+0000) Subject: compiler: add error to list of built-in types. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e411850054322167de1ae23af2b7c9b7a1ac9029;p=gcc.git compiler: add error to list of built-in types. From-SVN: r181889 --- diff --git a/gcc/go/gofrontend/export.cc b/gcc/go/gofrontend/export.cc index 0832055510c..3fb7089cc7c 100644 --- a/gcc/go/gofrontend/export.cc +++ b/gcc/go/gofrontend/export.cc @@ -337,6 +337,7 @@ Export::register_builtin_types(Gogo* gogo) this->register_builtin_type(gogo, "uintptr", BUILTIN_UINTPTR); this->register_builtin_type(gogo, "bool", BUILTIN_BOOL); this->register_builtin_type(gogo, "string", BUILTIN_STRING); + this->register_builtin_type(gogo, "error", BUILTIN_ERROR); } // Register one builtin type in the export table. diff --git a/gcc/go/gofrontend/export.h b/gcc/go/gofrontend/export.h index 1f8278f419a..a06b549b609 100644 --- a/gcc/go/gofrontend/export.h +++ b/gcc/go/gofrontend/export.h @@ -39,8 +39,9 @@ enum Builtin_code BUILTIN_STRING = -16, BUILTIN_COMPLEX64 = -17, BUILTIN_COMPLEX128 = -18, + BUILTIN_ERROR = -19, - SMALLEST_BUILTIN_CODE = -18 + SMALLEST_BUILTIN_CODE = -19 }; // This class manages exporting Go declarations. It handles the main diff --git a/gcc/go/gofrontend/import.cc b/gcc/go/gofrontend/import.cc index d3405c191c9..075109c0c04 100644 --- a/gcc/go/gofrontend/import.cc +++ b/gcc/go/gofrontend/import.cc @@ -706,6 +706,7 @@ Import::register_builtin_types(Gogo* gogo) this->register_builtin_type(gogo, "uintptr", BUILTIN_UINTPTR); this->register_builtin_type(gogo, "bool", BUILTIN_BOOL); this->register_builtin_type(gogo, "string", BUILTIN_STRING); + this->register_builtin_type(gogo, "error", BUILTIN_ERROR); } // Register a single builtin type.