Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / Shell / SymbolFile / NativePDB / inline_sites_live.cpp
blob767149ea18c468f87d46775e1bc7f37bef3c5151
1 // clang-format off
2 // REQUIRES: system-windows
4 // RUN: %build -o %t.exe -- %s
5 // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
6 // RUN: %p/Inputs/inline_sites_live.lldbinit 2>&1 | FileCheck %s
8 void use(int) {}
10 void __attribute__((always_inline)) bar(int param) {
11 use(param); // BP_bar
14 void __attribute__((always_inline)) foo(int param) {
15 int local = param+1;
16 bar(local);
17 use(param);
18 use(local); // BP_foo
21 int main(int argc, char** argv) {
22 foo(argc);
25 // CHECK: * thread #1, stop reason = breakpoint 1
26 // CHECK-NEXT: frame #0: {{.*}}`main [inlined] bar(param=2)
27 // CHECK: (lldb) expression param
28 // CHECK-NEXT: (int) $0 = 2
29 // CHECK: * thread #1, stop reason = breakpoint 2
30 // CHECK-NEXT: frame #0: {{.*}}`main [inlined] foo(param=1)
31 // CHECK: (lldb) expression param
32 // CHECK-NEXT: (int) $1 = 1
33 // CHECK-NEXT: (lldb) expression local
34 // CHECK-NEXT: (int) $2 = 2