Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Demangler] Don't truncate demangling of an associated type descriptor #26980

Merged
merged 5 commits into from Sep 3, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/Demangling/NodePrinter.cpp
Expand Up @@ -1704,10 +1704,16 @@ NodePointer NodePrinter::print(NodePointer Node, bool asPrefixContext) {
Printer << ": ";
print(Node->getChild(2));
return nullptr;
case Node::Kind::AssociatedTypeDescriptor:
case Node::Kind::AssociatedTypeDescriptor: {
Printer << "associated type descriptor for ";
print(Node->getChild(0));
auto assoc = Node->getChild(0);
if (auto parent = getFirstChildOfKind(assoc, Node::Kind::Type)) {
theblixguy marked this conversation as resolved.
Show resolved Hide resolved
print(parent);
Printer << ".";
}
print(assoc);
return nullptr;
}
case Node::Kind::AssociatedTypeMetadataAccessor:
Printer << "associated type metadata accessor for ";
print(Node->getChild(1));
Expand Down
2 changes: 1 addition & 1 deletion test/Demangle/Inputs/manglings.txt
Expand Up @@ -341,7 +341,7 @@ $S7TestMod5OuterV3Fooayx_SiGD ---> TestMod.Outer<A>.Foo<Swift.Int>
$Ss17_VariantSetBufferO05CocoaC0ayx_GD ---> Swift._VariantSetBuffer<A>.CocoaBuffer
$S2t21QP22ProtocolTypeAliasThingayAA4BlahV5SomeQa_GSgD ---> t2.Blah.SomeQ as t2.Q.ProtocolTypeAliasThing?
$s1A1gyyxlFx_qd__t_Ti5 ---> inlined generic function <(A, A1)> of A.g<A>(A) -> ()
$S1T19protocol_resilience17ResilientProtocolPTl ---> associated type descriptor for T
$S1T19protocol_resilience17ResilientProtocolPTl ---> associated type descriptor for protocol_resilience.ResilientProtocol.T
$S18resilient_protocol21ResilientBaseProtocolTL ---> protocol requirements base descriptor for resilient_protocol.ResilientBaseProtocol
$S1t1PP10AssocType2_AA1QTn ---> associated conformance descriptor for t.P.AssocType2: t.Q
$S1t1PP10AssocType2_AA1QTN ---> default associated conformance accessor for t.P.AssocType2: t.Q
Expand Down