summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-undname
Commit message (Collapse)AuthorAgeFilesLines
* [Demangle] Add a few more options to the microsoft demanglerMartin Storsjo2019-10-151-0/+20
| | | | | | | | | | | | | | | This corresponds to commonly used options to UnDecorateSymbolName within llvm. Add them as hidden options in llvm-undname. MS undname.exe takes numeric flags, corresponding to the UNDNAME_* constants, but instead of hardcoding in mappings for those numbers, just add textual options instead, as it the use of them here is primarily intended for testing. Differential Revision: https://reviews.llvm.org/D68917 llvm-svn: 374865
* llvm-undname: Add a -raw-file flag to pass a raw buffer to microsoftDemangleNico Weber2019-04-161-4/+23
| | | | | | | | | | | | | | The default handling splits input into lines. Since llvm-microsoft-demangle-fuzzer doesn't do this, oss-fuzz produces inputs that only trigger crashes if the input isn't split into lines. This adds a hidden flag -raw-file which passes file contents to microsoftDemangle() in the same way the fuzzer does, for reproducing oss-fuzz reports. Also change llvm-undname to have a non-0 exit code for invalid symbols. Differential Revision: https://reviews.llvm.org/D60771 llvm-svn: 358485
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-192-8/+6
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Move demangling function from llvm-objdump to Demangle libraryJames Henderson2019-01-171-3/+3
| | | | | | | | | | | | | | | | This allows it to be used in an upcoming llvm-readobj change. A small change in internal behaviour of the function is to always call the microsoftDemangle function if the string does not have an itanium encoding prefix, rather than only if it starts with '?'. This is harmless because the microsoftDemangle function does the same check already. Reviewed by: grimar, erik.pilkington Differential Revision: https://reviews.llvm.org/D56721 llvm-svn: 351448
* [llvm-undname] Use WithColor for error reportingJonas Devlieghere2018-11-111-1/+2
| | | | | | Use helpers from Support/WithError.h to print errors. llvm-svn: 346622
* [llvm-undname Add an option to dump back references.Zachary Turner2018-08-011-1/+9
| | | | | | | | | This is useful for understanding how our demangler processes back references and for investigating issues related to back references. But it's a feature only useful for debugging the demangling process itself, so I'm marking it hidden. llvm-svn: 338609
* [llvm-undname] Flush output before demangling.Zachary Turner2018-07-211-1/+4
| | | | | | | | | If an error occurs and we write it to stderr, it could appear before we wrote the mangled name which we're undecorating. By flushing stdout first, we ensure that the messages are always sequenced in the correct order. llvm-svn: 337645
* [llvm-undname] Remove a superfluous semicolon. NFC.Martin Storsjo2018-07-201-2/+2
| | | | llvm-svn: 337615
* Add a Microsoft Demangler.Zachary Turner2018-07-203-0/+110
This adds initial support for a demangling library (LLVMDemangle) and tool (llvm-undname) for demangling Microsoft names. This doesn't cover 100% of cases and there are some known limitations which I intend to address in followup patches, at least until such time that we have (near) 100% test coverage matching up with all of the test cases in clang/test/CodeGenCXX/mangle-ms-*. Differential Revision: https://reviews.llvm.org/D49552 llvm-svn: 337584
OpenPOWER on IntegriCloud