Skip to content

Commit 0dbaa43

Browse files
committed
Demangler: Register substitution for opaque archetype manglings
1 parent 01df1ac commit 0dbaa43

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/Demangling/Demangler.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1941,7 +1941,9 @@ NodePointer Demangler::demangleArchetype() {
19411941
if (retroactiveConformances)
19421942
opaque->addChild(retroactiveConformances, *this);
19431943

1944-
return createType(opaque);
1944+
auto opaqueTy = createType(opaque);
1945+
addSubstitution(opaqueTy);
1946+
return opaqueTy;
19451947
}
19461948
case 'r': {
19471949
return createType(createNode(Node::Kind::OpaqueReturnType));

lib/Demangling/NodePrinter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2268,7 +2268,9 @@ NodePointer NodePrinter::print(NodePointer Node, bool asPrefixContext) {
22682268
Printer << ">>";
22692269
return nullptr;
22702270
case Node::Kind::OpaqueType:
2271-
printChildren(Node);
2271+
print(Node->getChild(0));
2272+
Printer << '.';
2273+
print(Node->getChild(1));
22722274
return nullptr;
22732275
case Node::Kind::AccessorFunctionReference:
22742276
Printer << "accessor function at " << Node->getIndex();

0 commit comments

Comments
 (0)