@@ -483,11 +483,11 @@ class Context {
483483 // /
484484 // / \param MangledName The mangled symbol string, which start a mangling
485485 // / prefix: _T, _T0, $S, _$S.
486- // / \param printer The NodePrinter that will be used to demangle the symbol.
486+ // / \param Printer The NodePrinter that will be used to demangle the symbol.
487487 // /
488488 // / \returns The demangled string.
489489 void demangleSymbolAsString (llvm::StringRef MangledName,
490- NodePrinter *printer );
490+ NodePrinter &Printer );
491491
492492 // / Demangle the given type and return the readable name.
493493 // /
@@ -550,12 +550,11 @@ demangleSymbolAsString(const char *mangledName, size_t mangledNameLength,
550550// / demangled string is stored in the `printer`.
551551// /
552552// / If performance is an issue when demangling multiple symbols,
553- // / `Context::demangleSymbolAsString` should be used instead.
554553// / \param mangledName The mangled name string pointer.
555554// / \param mangledNameLength The length of the mangledName string.
556555// / \param printer The NodePrinter that will be used to demangle the symbol.
557- void demangleSymbolAsString (const char * mangledName, size_t mangledNameLength ,
558- NodePrinter * printer);
556+ void demangleSymbolAsString (const llvm::StringRef mangledName,
557+ NodePrinter & printer);
559558
560559// / Standalone utility function to demangle the given symbol as string.
561560// /
@@ -583,17 +582,6 @@ demangleSymbolAsString(llvm::StringRef MangledName,
583582 MangledName.size (), Options);
584583}
585584
586- // / Standalone utility function to demangle the given symbol as string. The
587- // / result is stored in the `printer`.
588- // /
589- // / If performance is an issue when demangling multiple symbols,
590- // / Context::demangleSymbolAsString should be used instead.
591- // / \param MangledName The mangled name string.
592- inline void demangleSymbolAsString (llvm::StringRef MangledName,
593- NodePrinter *printer) {
594- demangleSymbolAsString (MangledName.data (), MangledName.size (), printer);
595- }
596-
597585// / Standalone utility function to demangle the given type as string.
598586// /
599587// / If performance is an issue when demangling multiple symbols,
@@ -771,7 +759,7 @@ std::string nodeToString(NodePointer Root,
771759// /
772760// / \param Root A pointer to a parse tree generated by the demangler.
773761// / \param Printer A NodePrinter used to pretty print the demangled Node.
774- void nodeToString (NodePointer Root, NodePrinter * Printer);
762+ void nodeToString (NodePointer Root, NodePrinter & Printer);
775763
776764// / Transforms a mangled key path accessor thunk helper
777765// / into the identfier/subscript that would be used to invoke it in swift code.
0 commit comments