mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[serialization] Add support for oneofs.
Since SILGen support is so poor, the test just uses -parse. Swift SVN r6136
This commit is contained in:
@@ -237,6 +237,8 @@ namespace decls_block {
|
||||
POSTFIX_OPERATOR_DECL,
|
||||
INFIX_OPERATOR_DECL,
|
||||
CLASS_DECL,
|
||||
ONEOF_DECL,
|
||||
ONEOF_ELEMENT_DECL,
|
||||
|
||||
PAREN_PATTERN = 200,
|
||||
TUPLE_PATTERN,
|
||||
@@ -406,6 +408,7 @@ namespace decls_block {
|
||||
using StructLayout = NominalLayout<STRUCT_DECL>;
|
||||
using ProtocolLayout = NominalLayout<PROTOCOL_DECL>;
|
||||
using ClassLayout = NominalLayout<CLASS_DECL>;
|
||||
using OneOfLayout = NominalLayout<ONEOF_DECL>;
|
||||
|
||||
using ConstructorLayout = BCRecordLayout<
|
||||
CONSTRUCTOR_DECL,
|
||||
@@ -466,6 +469,15 @@ namespace decls_block {
|
||||
BCFixed<8> // precedence
|
||||
>;
|
||||
|
||||
using OneOfElementLayout = BCRecordLayout<
|
||||
ONEOF_ELEMENT_DECL,
|
||||
IdentifierIDField, // name
|
||||
DeclIDField, // context decl
|
||||
TypeIDField, // argument type
|
||||
TypeIDField, // constructor type
|
||||
BCFixed<1> // implicit?
|
||||
>;
|
||||
|
||||
|
||||
using ParenPatternLayout = BCRecordLayout<
|
||||
PAREN_PATTERN
|
||||
|
||||
Reference in New Issue
Block a user