[serialization] Don't special-case builtin types.

Instead, special-case cross-references to use the empty identifier as the
name of the Builtin module. This way imported modules will be able to use
builtin types and functions without the main TU having access.

Swift SVN r5947
This commit is contained in:
Jordan Rose
2013-07-01 21:05:39 +00:00
parent 1528454dca
commit cb45063516
5 changed files with 27 additions and 38 deletions

View File

@@ -180,8 +180,7 @@ namespace decls_block {
// These IDs must \em not be renumbered or reordered without incrementing
// VERSION_MAJOR.
enum : uint8_t {
BUILTIN_TYPE = 1,
NAME_ALIAS_TYPE,
NAME_ALIAS_TYPE = 1,
STRUCT_TYPE,
PAREN_TYPE,
TUPLE_TYPE,
@@ -212,11 +211,6 @@ namespace decls_block {
DECL_CONTEXT = 255
};
using BuiltinTypeLayout = BCRecordLayout<
BUILTIN_TYPE,
BCBlob // name of the builtin type
>;
using NameAliasTypeLayout = BCRecordLayout<
NAME_ALIAS_TYPE,
DeclIDField // typealias decl