@@ -1560,6 +1560,7 @@ NodePointer Demangler::popFunctionType(Node::Kind kind, bool hasClangType) {
15601560 ClangType = demangleClangType ();
15611561 }
15621562 addChild (FuncType, ClangType);
1563+ addChild (FuncType, popNode (Node::Kind::SelfLifetimeDependence));
15631564 addChild (FuncType, popNode (Node::Kind::GlobalActorFunctionType));
15641565 addChild (FuncType, popNode (Node::Kind::IsolatedAnyFunctionType));
15651566 addChild (FuncType, popNode (Node::Kind::TransferringResultFunctionType));
@@ -1570,7 +1571,6 @@ NodePointer Demangler::popFunctionType(Node::Kind kind, bool hasClangType) {
15701571 }));
15711572 addChild (FuncType, popNode (Node::Kind::ConcurrentFunctionType));
15721573 addChild (FuncType, popNode (Node::Kind::AsyncAnnotation));
1573- addChild (FuncType, popNode (Node::Kind::SelfLifetimeDependence));
15741574
15751575 FuncType = addChild (FuncType, popFunctionParams (Node::Kind::ArgumentTuple));
15761576 FuncType = addChild (FuncType, popFunctionParams (Node::Kind::ReturnType));
@@ -1603,6 +1603,9 @@ NodePointer Demangler::popFunctionParamLabels(NodePointer Type) {
16031603 return nullptr ;
16041604
16051605 unsigned FirstChildIdx = 0 ;
1606+ if (FuncType->getChild (FirstChildIdx)->getKind () ==
1607+ Node::Kind::SelfLifetimeDependence)
1608+ ++FirstChildIdx;
16061609 if (FuncType->getChild (FirstChildIdx)->getKind ()
16071610 == Node::Kind::GlobalActorFunctionType)
16081611 ++FirstChildIdx;
@@ -1629,9 +1632,6 @@ NodePointer Demangler::popFunctionParamLabels(NodePointer Type) {
16291632 if (FuncType->getChild (FirstChildIdx)->getKind () ==
16301633 Node::Kind::ParamLifetimeDependence)
16311634 ++FirstChildIdx;
1632- if (FuncType->getChild (FirstChildIdx)->getKind () ==
1633- Node::Kind::SelfLifetimeDependence)
1634- ++FirstChildIdx;
16351635 auto ParameterType = FuncType->getChild (FirstChildIdx);
16361636
16371637 assert (ParameterType->getKind () == Node::Kind::ArgumentTuple);
0 commit comments