xref: /llvm-project/llvm/test/tools/llvm-cxxfilt/simple.test (revision 9614a7c939152909eac40bc1ee8e39c98fd0f483)
1## Show that llvm-cxxfilt can handle basic demangling for command-line inputs,
2## including when they are part of a string. Note that this test uses "-n"
3## (alias for --no-strip-underscore) because on darwin, the default for
4## --strip-underscore is true, but false elsewhere.
5
6RUN: llvm-cxxfilt -n _Z1fi abc | FileCheck %s
7RUN: echo "Mangled _Z1fi and _Z3foov in string." | llvm-cxxfilt -n \
8RUN:   | FileCheck %s --check-prefix=CHECK-STRING
9RUN: llvm-cxxfilt -n "CLI remains mangled _Z1fi" \
10RUN:   | FileCheck %s --check-prefix=CHECK-MANGLED
11
12CHECK: f(int)
13CHECK-NEXT: abc
14CHECK-STRING: Mangled f(int) and foo() in string.
15CHECK-MANGLED: CLI remains mangled _Z1fi
16