brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · cf1eac2 Raw
35 lines · plain
1RUN: llvm-cxxfilt             -n _Z3fooILZ3BarEET_f _Z3fooIPFcfEET_d _ZN1f2baC2ERKNS_2baIT_EE _Z3foov.123 | FileCheck %s --check-prefix=CHECK-PARAMS2RUN: llvm-cxxfilt          -p -n _Z3fooILZ3BarEET_f _Z3fooIPFcfEET_d _ZN1f2baC2ERKNS_2baIT_EE _Z3foov.123 | FileCheck %s --check-prefix=CHECK-NO-PARAMS --match-full-lines3RUN: llvm-cxxfilt --no-params -n _Z3fooILZ3BarEET_f _Z3fooIPFcfEET_d _ZN1f2baC2ERKNS_2baIT_EE _Z3foov.123 | FileCheck %s --check-prefix=CHECK-NO-PARAMS --match-full-lines4 5# Check that -p or --no-params flag omits function parameters and the return6# type.7 8CHECK-PARAMS: Bar foo<Bar>(float)9CHECK-NO-PARAMS: foo<Bar>10 11# Check that only the top-level function is impacted by the switch, and that12# nested function types in the encoding (e.g. where a function type is being13# 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 19CHECK-PARAMS: char (*foo<char (*)(float)>(double))(float)20CHECK-NO-PARAMS: foo<char (*)(float)>21 22# Use an invalid mangled name broken in the function parameters to check how -p23# or --no-params flag works. If the option is given we should be able to24# demangle the function name just fine. If it is not given, demangling will fail25# because of the invalid params.26 27CHECK-PARAMS: _ZN1f2baC2ERKNS_2baIT_EE28CHECK-NO-PARAMS: f::ba::ba29 30# Check that a vendor specific suffix is also omitted when --no-params is31# specified. This matches c++filt's behaviour.32 33CHECK-PARAMS: foo() (.123)34CHECK-NO-PARAMS: foo35