OSDN Git Service

compiler: add error to list of built-in types.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Dec 2011 18:57:10 +0000 (18:57 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Dec 2011 18:57:10 +0000 (18:57 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181889 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 0832055..3fb7089 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, "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.
 }
 
 // Register one builtin type in the export table.
index 1f8278f..a06b549 100644 (file)
@@ -39,8 +39,9 @@ enum Builtin_code
   BUILTIN_STRING = -16,
   BUILTIN_COMPLEX64 = -17,
   BUILTIN_COMPLEX128 = -18,
   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
 };
 
 // This class manages exporting Go declarations.  It handles the main
index d3405c1..075109c 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, "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.
 }
 
 // Register a single builtin type.