brintos

brintos / llvm-project-archived public Read only

0
0
Text · 911 B · 4a06e63 Raw
35 lines · cpp
1// clang-format off
2// REQUIRES: target-windows
3
4// RUN: %build -o %t.exe -- %s
5// RUN: %lldb -f %t.exe -s \
6// RUN:     %p/Inputs/inline_sites_live.lldbinit 2>&1 | FileCheck %s
7
8void use(int) {}
9
10void __attribute__((always_inline)) bar(int param) {
11  use(param); // BP_bar
12}
13
14void __attribute__((always_inline)) foo(int param) {
15  int local = param+1;
16  bar(local);
17  use(param);
18  use(local); // BP_foo
19}
20
21int main(int argc, char** argv) {
22  foo(argc);
23}
24
25// CHECK:      * thread #1, {{.*}}stop reason = breakpoint 1
26// CHECK-NEXT:    frame #0: {{.*}}`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: {{.*}}`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
35