mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[serialization] Add support for [conversion] methods.
Take advantage of the fact that a function can never be both a conversion method and an assignment operator to pack both flags into the same bit in the serialized record. Swift SVN r6185
This commit is contained in:
@@ -1016,6 +1016,7 @@ bool Serializer::writeDecl(const Decl *D) {
|
||||
attrs.ExplicitPostfix = false;
|
||||
attrs.ExplicitInfix = false;
|
||||
attrs.Assignment = false;
|
||||
attrs.Conversion = false;
|
||||
|
||||
// FIXME: Handle other attributes.
|
||||
if (!attrs.empty())
|
||||
@@ -1029,7 +1030,8 @@ bool Serializer::writeDecl(const Decl *D) {
|
||||
addDeclRef(DC),
|
||||
fn->isImplicit(),
|
||||
fn->isStatic(),
|
||||
fn->getAttrs().isAssignment(),
|
||||
fn->getAttrs().isAssignment() ||
|
||||
fn->getAttrs().isConversion(),
|
||||
addTypeRef(fn->getType()),
|
||||
addDeclRef(fn->getOperatorDecl()),
|
||||
addDeclRef(fn->getOverriddenDecl()));
|
||||
|
||||
Reference in New Issue
Block a user