brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 56ec09e Raw
53 lines · plain
1# XFAIL: target-windows2 3# Test the ${function.basename} frame-format variable.4 5# RUN: split-file %s %t6# RUN: %clangxx_host -g -gdwarf %t/main.cpp -o %t.out7# RUN: %lldb -x -b -s %t/commands.input %t.out -o exit 2>&1 \8# RUN:       | FileCheck %s9#10# RUN: %clangxx_host -O0 %t/main.cpp -o %t-nodebug.out11# RUN: %lldb -x -b -s %t/commands.input %t-nodebug.out -o exit 2>&1 \12# RUN:       | FileCheck %s13 14#--- main.cpp15namespace ns {16template<typename T>17struct Bar {18  template<typename K>19  T bar(K k) const & { return 1.0f; }20};21 22template<typename T>23struct Foo {24  template<typename K>25  [[gnu::abi_tag("Test")]] void foo() const volatile && {26    Bar<float> b;27    b.bar(b);28  }29};30 31template<typename T>32T func() {33  ns::Foo<int>{}.foo<int>();34  return T{};35}36} // namespace ns37 38int main() {39  ns::func<ns::Foo<int>>();40  return 0;41}42 43#--- commands.input44settings set -f frame-format "custom-frame '${function.basename}'\n"45break set -n bar46 47run48bt49 50# CHECK: custom-frame 'bar'51# CHECK: custom-frame 'foo[abi:Test]'52# CHECK: custom-frame 'func'53