mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Don't mangle directness into type metadata symbols.
Anywhere we can't directly address type metadata in Swift, we've found we need a function call. Directness isn't useful here. Swift SVN r32626
This commit is contained in:
@@ -493,7 +493,6 @@ private:
|
||||
if (Mangled.nextIf('P')) {
|
||||
auto pattern =
|
||||
NodeFactory::create(Node::Kind::GenericTypeMetadataPattern);
|
||||
DEMANGLE_CHILD_AS_NODE_OR_RETURN(pattern, Directness);
|
||||
DEMANGLE_CHILD_OR_RETURN(pattern, Type);
|
||||
return pattern;
|
||||
}
|
||||
@@ -525,7 +524,6 @@ private:
|
||||
return metadata;
|
||||
}
|
||||
auto metadata = NodeFactory::create(Node::Kind::TypeMetadata);
|
||||
DEMANGLE_CHILD_AS_NODE_OR_RETURN(metadata, Directness);
|
||||
DEMANGLE_CHILD_OR_RETURN(metadata, Type);
|
||||
return metadata;
|
||||
}
|
||||
@@ -3219,9 +3217,8 @@ void NodePrinter::print(NodePointer pointer, bool asContext, bool suppressType)
|
||||
return;
|
||||
}
|
||||
case Node::Kind::GenericTypeMetadataPattern:
|
||||
print(pointer->getChild(0)); // directness
|
||||
Printer << "generic type metadata pattern for ";
|
||||
print(pointer->getChild(1));
|
||||
print(pointer->getChild(0));
|
||||
return;
|
||||
case Node::Kind::Metaclass:
|
||||
Printer << "metaclass for ";
|
||||
@@ -3232,9 +3229,8 @@ void NodePrinter::print(NodePointer pointer, bool asContext, bool suppressType)
|
||||
print(pointer->getChild(0));
|
||||
return;
|
||||
case Node::Kind::TypeMetadata:
|
||||
print(pointer->getChild(0)); // directness
|
||||
Printer << "type metadata for ";
|
||||
print(pointer->getChild(1));
|
||||
print(pointer->getChild(0));
|
||||
return;
|
||||
case Node::Kind::TypeMetadataAccessFunction:
|
||||
Printer << "type metadata accessor for ";
|
||||
|
||||
Reference in New Issue
Block a user