summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Define InitLLVM to do common initialization all at once.Rui Ueyama2018-04-131-4/+2
| | | | | | | | | | | We have a few functions that virtually all command wants to run on process startup/shutdown. This patch adds InitLLVM class to do that all at once, so that we don't need to copy-n-paste boilerplate code to each llvm command's main() function. Differential Revision: https://reviews.llvm.org/D45602 llvm-svn: 330046
* Add opt-viewer testingAdam Nemet2017-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | Detects whether we have the Python modules (pygments, yaml) required by opt-viewer and hooks this up to REQUIRES. This fixes https://bugs.llvm.org/show_bug.cgi?id=34129 (the lack of opt-viewer testing). It's also related to https://github.com/apple/swift/pull/12938 and the idea is to expose LLVM_HAVE_OPT_VIEWER_MODULES to the Swift cmake. Differential Revision: https://reviews.llvm.org/D40202 Fixes since the first commit: 1. Disable syntax highlighting as different versions of pygments generate different HTML 2. Use llvm-cxxfilt from the build llvm-svn: 319324
* c++filt: support COFF import thunksSaleem Abdulrasool2017-03-221-0/+6
| | | | | | | The synthetic thunk for the import is prefixed with __imp_. Attempt to undecorate the names when they begin with the __imp_ prefix. llvm-svn: 298550
* llvm-cxxfilt: support `-_`Saleem Abdulrasool2017-01-221-6/+23
| | | | | | | | Add the `--strip-underscore` option to llvm-cxxfilt to strip the leading underscore. This is useful for when dealing with targets which add a leading underscore. llvm-svn: 292759
* llvm-cxxfilt: support the `-s` optionSaleem Abdulrasool2017-01-211-0/+19
| | | | | | | | | | This is a stub implementation of the `-s` or `--format` option that allows the user to specify the demangling style. Since we only support the Itanium (GNU) style demangling, auto is synonymous with `gnu`. Simply swallow the option to permit some level of commandline compatibility. llvm-svn: 292706
* llvm-cxxfilt: add missing includes from previous changeSaleem Abdulrasool2017-01-201-0/+2
| | | | llvm-svn: 292580
* llvm-cxxfilt: fix program descriptionSaleem Abdulrasool2017-01-201-1/+4
| | | | | | | | Fix a silly copy-paste error in the tool description. Take the opportunity to add crash stack printing which will hopefully never be needed. llvm-svn: 292579
* llvm-cxxfilt: support `-t` to demangle typesSaleem Abdulrasool2017-01-201-5/+18
| | | | | | | | By default c++filt demangles functions, though you can optionally pass `-t` to have it decode types as well, behaving nearly identical to `__cxa_demangle`. Add support for this mode. llvm-svn: 292576
* llvm-cxxfilt: filter out invalid manglingsSaleem Abdulrasool2017-01-191-3/+6
| | | | | | | | | | c++filt does not attempt to demangle symbols which do not match its expected format. This means that the symbol must start with _Z or ___Z (block invocation function extension). Any other symbols are returned as is. Note that this is different from the behaviour of __cxa_demangle which will demangle fragments. llvm-svn: 292467
* llvm-cxxfilt: support reading from stdinSaleem Abdulrasool2016-11-131-10/+17
| | | | | | | | `c++filt` when given no arguments runs as a REPL, decoding each line as a decorated name. Unify the test structure to be more uniform, with the tests for llvm-cxxfilt living under test/tools/llvm-cxxfilt. llvm-svn: 286777
* [llvm-cxxfilt] Use llvm::outs(). Simplify.Davide Italiano2016-09-271-5/+2
| | | | | | | This adds a dependency on Support/. As llvm-cxxfilt will grow support for options this will be needed anyway. llvm-svn: 282523
* Add an c++ itanium demangler to llvm.Rafael Espindola2016-09-061-0/+29
This adds a copy of the demangler in libcxxabi. The code also has no dependencies on anything else in LLVM. To enforce that I added it as another library. That way a BUILD_SHARED_LIBS will fail if anyone adds an use of StringRef for example. The no llvm dependency combined with the fact that this has to build on linux, OS X and Windows required a few changes to the code. In particular: No constexpr. No alignas On OS X at least this library has only one global symbol: __ZN4llvm16itanium_demangleEPKcPcPmPi My current plan is: Commit something like this Change lld to use it Change lldb to use it as the fallback Add a few #ifdefs so that exactly the same file can be used in libcxxabi to export abi::__cxa_demangle. Once the fast demangler in lldb can handle any names this implementation can be replaced with it and we will have the one true demangler. llvm-svn: 280732
OpenPOWER on IntegriCloud