@@ -1560,6 +1560,7 @@ NodePointer Demangler::popFunctionType(Node::Kind kind, bool hasClangType) {
1560
1560
ClangType = demangleClangType ();
1561
1561
}
1562
1562
addChild (FuncType, ClangType);
1563
+ addChild (FuncType, popNode (Node::Kind::SelfLifetimeDependence));
1563
1564
addChild (FuncType, popNode (Node::Kind::GlobalActorFunctionType));
1564
1565
addChild (FuncType, popNode (Node::Kind::IsolatedAnyFunctionType));
1565
1566
addChild (FuncType, popNode (Node::Kind::TransferringResultFunctionType));
@@ -1570,7 +1571,6 @@ NodePointer Demangler::popFunctionType(Node::Kind kind, bool hasClangType) {
1570
1571
}));
1571
1572
addChild (FuncType, popNode (Node::Kind::ConcurrentFunctionType));
1572
1573
addChild (FuncType, popNode (Node::Kind::AsyncAnnotation));
1573
- addChild (FuncType, popNode (Node::Kind::SelfLifetimeDependence));
1574
1574
1575
1575
FuncType = addChild (FuncType, popFunctionParams (Node::Kind::ArgumentTuple));
1576
1576
FuncType = addChild (FuncType, popFunctionParams (Node::Kind::ReturnType));
@@ -1603,6 +1603,9 @@ NodePointer Demangler::popFunctionParamLabels(NodePointer Type) {
1603
1603
return nullptr ;
1604
1604
1605
1605
unsigned FirstChildIdx = 0 ;
1606
+ if (FuncType->getChild (FirstChildIdx)->getKind () ==
1607
+ Node::Kind::SelfLifetimeDependence)
1608
+ ++FirstChildIdx;
1606
1609
if (FuncType->getChild (FirstChildIdx)->getKind ()
1607
1610
== Node::Kind::GlobalActorFunctionType)
1608
1611
++FirstChildIdx;
@@ -1629,9 +1632,6 @@ NodePointer Demangler::popFunctionParamLabels(NodePointer Type) {
1629
1632
if (FuncType->getChild (FirstChildIdx)->getKind () ==
1630
1633
Node::Kind::ParamLifetimeDependence)
1631
1634
++FirstChildIdx;
1632
- if (FuncType->getChild (FirstChildIdx)->getKind () ==
1633
- Node::Kind::SelfLifetimeDependence)
1634
- ++FirstChildIdx;
1635
1635
auto ParameterType = FuncType->getChild (FirstChildIdx);
1636
1636
1637
1637
assert (ParameterType->getKind () == Node::Kind::ArgumentTuple);
0 commit comments