summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-cxxfilt
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-cxxfilt] Correctly demangle COFF import thunkSteven Wu2019-12-161-1/+8
| | | | | | | | | | | | | | | | | | | | Summary: llvm-cxxfilt wasn't correctly demangle COFF import thunk in those two cases before: * demangle in split mode (multiple words from commandline) * the import thunk prefix was added no matter the later part of the string can be demangled or not Now llvm-cxxfilt should handle both case correctly. Reviewers: compnerd, erik.pilkington, jhenderson Reviewed By: jhenderson Subscribers: jkorous, dexonsmith, ributzka, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71425
* [test][llvm-cxxfilt] Improve comment for clarityJames Henderson2019-12-101-2/+2
| | | | Differential Revision: https://reviews.llvm.org/D71202
* [test][llvm-cxxfilt] Add missing '-n'James Henderson2019-12-091-1/+1
| | | | See also e84468c1f.
* [test][llvm-cxxfilt] Fix darwin build botJames Henderson2019-12-095-7/+25
| | | | | | | | When committing dba420bc05ae, I missed that a darwin-specific change had been recently introduced into llvm-cxxfilt, which my change ignored and consequently broke the darwin build bot. This change fixes this issue as well as improving naming/commenting of things related to this point so that people are less likely to run into the same issue as I did.
* [test][tools] Add missing and improve testingJames Henderson2019-12-092-4/+6
| | | | | | | | | | | Mostly this adds testing for certain aliases in more explicit ways. There are also a few tidy-ups, and additions of missing testing, where the feature was either not tested at all, or not tested explicitly and sufficiently. Reviewed by: MaskRay, rupprecht, grimar Differential Revision: https://reviews.llvm.org/D71116
* [llvm-cxxfilt] Improve strip-underscore behaviorSteven Wu2019-11-1810-11/+15
| | | | | | | | | | | | | | | | | | | | Summary: For platform that uses macho format, c++filt should be stripping the leading underscore by default. Introduce the binutil compatible "-n" option to control strip-undercore behaivor together with the existing "-_" option and fallback to system default if none of them are set. rdar://problem/57173514 Reviewers: compnerd, erik.pilkington, dexonsmith, mattd Reviewed By: compnerd, erik.pilkington Subscribers: jkorous, ributzka, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70250
* [binutils] Add response file option to help and docsJames Henderson2019-06-211-0/+7
| | | | | | | | | | | | | | | | | | | | | Many LLVM-based tools already support response files (i.e. files containing a list of options, specified with '@'). This change simply updates the documentation and help text for some of these tools to include it. I haven't attempted to fix all tools, just a selection that I am interested in. I've taken the opportunity to add some tests for --help behaviour, where they were missing. We could expand these tests, but I don't think that's within scope of this patch. This fixes https://bugs.llvm.org/show_bug.cgi?id=42233 and https://bugs.llvm.org/show_bug.cgi?id=42236. Reviewed by: grimar, MaskRay, jkorous Differential Revision: https://reviews.llvm.org/D63597 llvm-svn: 364036
* [llvm-cxxfilt]Add test to show that empty lines can be handledJames Henderson2019-03-121-0/+9
| | | | | | | | | | | | | | | | I recently discovered a bug in llvm-cxxfilt introduced in r353743 but was fixed later incidentally due to r355031. Specifically, llvm-cxxfilt was attempting to call .back() on an empty string any time there was a new line in the input. This was causing a crash in my debug builds only. This patch simply adds a test that explicitly tests that llvm-cxxfilt handles empty lines correctly. It may pass under release builds under the broken behaviour, but it fails at least in debug builds. Reviewed by: mattd Differential Revision: https://reviews.llvm.org/D58785 llvm-svn: 355929
* [llvm-cxxfilt] Re-enable split and demangle stdin input on certain ↵Matt Davis2019-02-271-0/+63
| | | | | | | | | | | | | | | | non-alphanumerics. This restores the patch that splits demangled stdin input on non-alphanumerics. I had reverted this patch earlier because it broke Windows build-bots. I have updated the test so that it passes on Windows. I was running the test from powershell and never saw the issue until I switched to the mingw shell. This reverts commit 628ab5c6820bdf3bb5a8e494b0fd9e7312ce7150. llvm-svn: 355031
* Revert "[llvm-cxxfilt] Split and demangle stdin input on certain ↵Matt Davis2019-02-271-63/+0
| | | | | | | | | | | | | non-alphanumerics." This reverts commit 5cd5f8f2563395f8767f94604eb4c4bea8dcbea0. The test passes on linux, but fails on the windows build-bots. This test failure seems to be a quoting issue between my test and FileCheck on Windows. I'm reverting this patch until I can replicate and fix in my Windows environment. llvm-svn: 355021
* [llvm-cxxfilt] Re-enable the delimiters test on Windows.Matt Davis2019-02-271-1/+0
| | | | | | | | | | The original intent was to enable this test for Windows; however, that initial patch broke one of the build-bots. I temporarily disabled this test on Windows until that issue was resolved. It was resolved in my previous patch (cfd1d9742ee2d1b8dd6b7), and now I am re-enabling this test. llvm-svn: 355011
* Clean up the delimiters test.Matt Davis2019-02-271-30/+30
| | | | | | | | | | | | Ideally this is a NFCI, used single quotes in most cases. Hopefully this will make the Windows bot happy. I've marked this unsupported on windows, until I get my windows box setup with this patch to test. I'll remove that constraint after I'm confident this will pass on windows. I just want to silence the buildbots for now. llvm-svn: 355007
* [llvm-cxxfilt] Split and demangle stdin input on certain non-alphanumerics.Matt Davis2019-02-271-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch attempts to replicate GNU c++-filt behavior when splitting stdin input for demangling. Previously, cxx-filt would split input only on spaces. Each delimited item is then demangled. From what I have tested, GNU c++filt also splits input on any character that does not make up the mangled name (notably commas, but also a large set of non-alphanumeric characters). This patch splits stdin input on any character that does not belong to the Itanium mangling format (since Itanium is currently the only supported format in llvm-cxxfilt). This is an update to PR39990 Reviewers: jhenderson, tejohnson, compnerd Reviewed By: compnerd Subscribers: erik.pilkington, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58416 llvm-svn: 354998
* [llvm-cxxfilt] Split and demangle stdin inputMatt Davis2019-02-112-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Originally, llvm-cxxfilt would treat a line as a single mangled item to be demangled. If a mangled name appears in the middle of that string, that name would not be demangled. GNU c++filt splits and demangles every word in a string that is piped to it via stdin. Prior to this patch llvm-cxxfilt would never split strings piped to it. This patch replicates the GNU behavior and splits strings that are piped to it via stdin. This fixes PR39990 Reviewers: compnerd, jhenderson, davide Reviewed By: compnerd, jhenderson Subscribers: erik.pilkington, jhenderson, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57350 llvm-svn: 353743
* Add test for demangling GNU ABI tags.Rafael Espindola2018-03-221-0/+6
| | | | | | Patch by Christopher James Halse Rogers! llvm-svn: 328256
* c++filt: support COFF import thunksSaleem Abdulrasool2017-03-221-0/+5
| | | | | | | 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-0/+11
| | | | | | | | 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 `-t` to demangle typesSaleem Abdulrasool2017-01-201-0/+5
| | | | | | | | 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-0/+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-132-0/+14
`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
OpenPOWER on IntegriCloud