Commit e4118500 by Ian Lance Taylor

compiler: add error to list of built-in types.

From-SVN: r181889
parent b0d0a291
...@@ -337,6 +337,7 @@ Export::register_builtin_types(Gogo* gogo) ...@@ -337,6 +337,7 @@ Export::register_builtin_types(Gogo* gogo)
this->register_builtin_type(gogo, "uintptr", BUILTIN_UINTPTR); this->register_builtin_type(gogo, "uintptr", BUILTIN_UINTPTR);
this->register_builtin_type(gogo, "bool", BUILTIN_BOOL); this->register_builtin_type(gogo, "bool", BUILTIN_BOOL);
this->register_builtin_type(gogo, "string", BUILTIN_STRING); 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.
......
...@@ -39,8 +39,9 @@ enum Builtin_code ...@@ -39,8 +39,9 @@ enum Builtin_code
BUILTIN_STRING = -16, BUILTIN_STRING = -16,
BUILTIN_COMPLEX64 = -17, BUILTIN_COMPLEX64 = -17,
BUILTIN_COMPLEX128 = -18, 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
......
...@@ -706,6 +706,7 @@ Import::register_builtin_types(Gogo* gogo) ...@@ -706,6 +706,7 @@ Import::register_builtin_types(Gogo* gogo)
this->register_builtin_type(gogo, "uintptr", BUILTIN_UINTPTR); this->register_builtin_type(gogo, "uintptr", BUILTIN_UINTPTR);
this->register_builtin_type(gogo, "bool", BUILTIN_BOOL); this->register_builtin_type(gogo, "bool", BUILTIN_BOOL);
this->register_builtin_type(gogo, "string", BUILTIN_STRING); 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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment