@@ -552,6 +552,9 @@ class NodePrinter {
552552 case Node::Kind::CanonicalSpecializedGenericTypeMetadataAccessFunction:
553553 case Node::Kind::NoncanonicalSpecializedGenericTypeMetadata:
554554 case Node::Kind::NoncanonicalSpecializedGenericTypeMetadataCache:
555+ case Node::Kind::GlobalVariableOnceDeclList:
556+ case Node::Kind::GlobalVariableOnceFunction:
557+ case Node::Kind::GlobalVariableOnceToken:
555558 return false ;
556559 }
557560 printer_unreachable (" bad node kind" );
@@ -2466,6 +2469,28 @@ NodePointer NodePrinter::print(NodePointer Node, bool asPrefixContext) {
24662469 Printer << " cache variable for noncanonical specialized generic type metadata for " ;
24672470 print (Node->getChild (0 ));
24682471 return nullptr ;
2472+ case Node::Kind::GlobalVariableOnceToken:
2473+ case Node::Kind::GlobalVariableOnceFunction:
2474+ Printer << (kind == Node::Kind::GlobalVariableOnceToken
2475+ ? " one-time initialization token for "
2476+ : " one-time initialization function for " );
2477+ printContext (Node->getChild (0 ));
2478+ print (Node->getChild (1 ));
2479+ return nullptr ;
2480+ case Node::Kind::GlobalVariableOnceDeclList:
2481+ if (Node->getNumChildren () == 1 ) {
2482+ print (Node->getChild (0 ));
2483+ } else {
2484+ Printer << ' (' ;
2485+ for (unsigned i = 0 , e = Node->getNumChildren (); i < e; ++i) {
2486+ if (i != 0 ) {
2487+ Printer << " , " ;
2488+ }
2489+ print (Node->getChild (i));
2490+ }
2491+ Printer << ' )' ;
2492+ }
2493+ return nullptr ;
24692494 }
24702495 printer_unreachable (" bad node kind!" );
24712496}
0 commit comments