1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test/tools/llvm-cxxfilt/simple.test
Matt Davis 1aa268c431 [llvm-cxxfilt] Split and demangle stdin input
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
2019-02-11 20:30:53 +00:00

11 lines
380 B
Plaintext

RUN: llvm-cxxfilt _Z1fi abc | FileCheck %s
RUN: echo "Mangled _Z1fi and _Z3foov in string." | llvm-cxxfilt \
RUN: | FileCheck %s --check-prefix=CHECK-STRING
RUN: llvm-cxxfilt "CLI remains mangled _Z1fi" \
RUN: | FileCheck %s --check-prefix=CHECK-MANGLED
CHECK: f(int)
CHECK-NEXT: abc
CHECK-STRING: Mangled f(int) and foo() in string.
CHECK-MANGLED: CLI remains mangled _Z1fi