]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
compiler: add error to list of built-in types.
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 1 Dec 2011 18:57:10 +0000 (18:57 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 1 Dec 2011 18:57:10 +0000 (18:57 +0000)
From-SVN: r181889

gcc/go/gofrontend/export.cc
gcc/go/gofrontend/export.h
gcc/go/gofrontend/import.cc

index 0832055510c7c51ed98b0ead448e47a50d685947..3fb7089cc7ca636dedc937cbef9081569b80fc37 100644 (file)
@@ -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.
index 1f8278f419a10b96543b78def23bd29709996574..a06b549b609a2b2aef0af25e8c69635fcba4e6c1 100644 (file)
@@ -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
index d3405c191c9c3c16ad792e49e9a75ac2457f260c..075109c0c04851d21d0447ac039ad692d2df216a 100644 (file)
@@ -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.