To get this to work, delay some "cleanup" work in the
demangler. For example, we now preserve in the tree
whether something was mangled as an allocating
initializer, and we only special-case the class vs.
non-class cases in the pretty printer.
Also fixes a number of remangling bugs, of course.
Swift SVN r24534
demangling tree back into a mangled string.
Also, extend the demangling API in a few obvious
ways, and simplify testing for failure in the
node-returning APIs by having them simply return
null instead of a spurious Failure node.
Also, preserve slightly more information in the
demangling tree. The goal here is eventually to
always allow a perfect round-trip through the
demangler parse tree. This patch gets us close,
but we're not quite there yet.
Tests to follow.
Swift SVN r24473
The new demangler is in the "swift/SIL/Demangle.{h|cpp}" files, and in the swift::Demangle namespace, which has two public entry points:
std::string demangleSymbol(llvm::StringRef mangled);
std::string demangleType(llvm::StringRef mangled);
This was necessary to support the need for LLDB to demangle Swift symbol (and type) names
Test case is included
Swift SVN r6547