[llvm-cxxfilt] Split and demangle stdin input on certain non-alphanumerics.
authorMatt Davis <Matthew.Davis@sony.com>
Wed, 27 Feb 2019 16:29:50 +0000 (16:29 +0000)
committerMatt Davis <Matthew.Davis@sony.com>
Wed, 27 Feb 2019 16:29:50 +0000 (16:29 +0000)
commit5cd5f8f2563395f8767f94604eb4c4bea8dcbea0
tree45264447b48ec5afdcbab0c363dee3cabcf78876
parenta54fe15610d6d592590659186731daf1063dc153
[llvm-cxxfilt] Split and demangle stdin input on certain non-alphanumerics.

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/test/tools/llvm-cxxfilt/delimiters.test [new file with mode: 0644]
llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp