| 1 |
RUN: llvm-cxxfilt -n _Z3fooILZ3BarEET_f _Z3fooIPFcfEET_d _ZN1f2baC2ERKNS_2baIT_EE _Z3foov.123 | FileCheck %s --check-prefix=CHECK-PARAMS |
| 2 |
RUN: llvm-cxxfilt -p -n _Z3fooILZ3BarEET_f _Z3fooIPFcfEET_d _ZN1f2baC2ERKNS_2baIT_EE _Z3foov.123 | FileCheck %s --check-prefix=CHECK-NO-PARAMS --match-full-lines |
| 3 |
RUN: llvm-cxxfilt --no-params -n _Z3fooILZ3BarEET_f _Z3fooIPFcfEET_d _ZN1f2baC2ERKNS_2baIT_EE _Z3foov.123 | FileCheck %s --check-prefix=CHECK-NO-PARAMS --match-full-lines |
| 4 |
|
| 5 |
# Check that -p or --no-params flag omits function parameters and the return |
| 6 |
# type. |
| 7 |
|
| 8 |
CHECK-PARAMS: Bar foo<Bar>(float) |
| 9 |
CHECK-NO-PARAMS: foo<Bar> |
| 10 |
|
| 11 |
# Check that only the top-level function is impacted by the switch, and that |
| 12 |
# nested function types in the encoding (e.g. where a function type is being |
| 13 |
# used as a template parameter) still include their parameters. |
| 14 |
# |
| 15 |
# template <typename T> T foo(double); |
| 16 |
# typedef char (*F)(float); |
| 17 |
# F foo<F>(double) |
| 18 |
|
| 19 |
CHECK-PARAMS: char (*foo<char (*)(float)>(double))(float) |
| 20 |
CHECK-NO-PARAMS: foo<char (*)(float)> |
| 21 |
|
| 22 |
# Use an invalid mangled name broken in the function parameters to check how -p |
| 23 |
# or --no-params flag works. If the option is given we should be able to |
| 24 |
# demangle the function name just fine. If it is not given, demangling will fail |
| 25 |
# because of the invalid params. |
| 26 |
|
| 27 |
CHECK-PARAMS: _ZN1f2baC2ERKNS_2baIT_EE |
| 28 |
CHECK-NO-PARAMS: f::ba::ba |
| 29 |
|
| 30 |
# Check that a vendor specific suffix is also omitted when --no-params is |
| 31 |
# specified. This matches c++filt's behaviour. |
| 32 |
|
| 33 |
CHECK-PARAMS: foo() (.123) |
| 34 |
CHECK-NO-PARAMS: foo |