Commit Graph

18 Commits

Author SHA1 Message Date
John McCall
a0d3214e4c Test that the remangler round-trips successfully.
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
2015-01-19 23:12:58 +00:00
John McCall
bb675b6ac9 Add a basic "re-mangler", which turns a parsed
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
2015-01-16 06:33:08 +00:00
Dmitri Hrybenko
6670bb76ec Rewrite the CMake build system
Swift SVN r24124
2014-12-23 22:15:30 +00:00
Enrico Granata
bd81003632 The --tree-only option to swift-demangle was not doing what it promised to do, instead refusing to print anything. Fix it
Swift SVN r20862
2014-08-01 00:14:16 +00:00
Dmitri Hrybenko
26277fc41d Demangler: remove StringRef dependencies in the demangler interface and
PrettyStackTrace dependencies in the implementation


Swift SVN r20248
2014-07-21 12:46:58 +00:00
Jordan Rose
270cf80a6c [swift-demangle] Teach swift-demangle to filter stdin if given no arguments.
That is, teach swift-demangle to also be swift-filt.

Swift SVN r20231
2014-07-20 18:24:06 +00:00
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Ted Kremenek
028f9d0561 Remove rest of Makefile build except for 'docs' and 'www'.
For 'docs' and 'www' it is possible these are still being used,
as they work independent of the Makefile build.  Keeping them for now.

Swift SVN r14418
2014-02-26 22:21:25 +00:00
Dmitri Hrybenko
5a88513e71 Don't link to curses library explicitly
LLVM build system has been fixed to pass down this linker flag automatically.


Swift SVN r7048
2013-08-08 17:46:52 +00:00
Doug Gregor
7148cf6d8f Try to link swift-demangle against curses. Strange that we have a difference between the Xcode project and the makefile project
Swift SVN r6982
2013-08-07 17:10:30 +00:00
Doug Gregor
b6000d9a76 We don't need to explicitly link against curses.
Swift SVN r6979
2013-08-07 16:49:40 +00:00
Chris Lattner
1e00af609c attempt to unbreak jenkins
Swift SVN r6976
2013-08-07 15:17:51 +00:00
Chris Lattner
b7a6cbc638 fix the makefiles to only include swiftBasic in this.
Swift SVN r6719
2013-07-29 22:49:29 +00:00
Jordan Rose
50ac51b36e Autoconf: Fix dependencies for sil-opt and swift-demangle.
Swift SVN r6703
2013-07-29 20:21:35 +00:00
Enrico Granata
c75fe924a1 Moving the Swift demangler from libSIL to libBasic
Plus, a couple of minor cosmetic changes that I had held off for a couple days now



Swift SVN r6691
2013-07-29 17:42:57 +00:00
John McCall
5d1920e3eb The demangler doesn't actually require the serialization library.
Swift SVN r6689
2013-07-29 17:18:38 +00:00
John McCall
a7b8254210 More Makefile support for swift-demangle.
Swift SVN r6669
2013-07-27 00:42:26 +00:00
Enrico Granata
efcd17f604 This commit implements the Demangler API in C++ and de facto deprecates the existing Demangle.swift
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
2013-07-24 17:52:27 +00:00