xref: /llvm-project/lldb/test/API/lang/c/inlines/main.c (revision 19bce1702bd1e399bea76d0de2a649a14551b000)
1 #include <stdio.h>
2 
3 inline void test1(int) __attribute__ ((always_inline));
4 inline void test2(int) __attribute__ ((always_inline));
5 
6 // Called once from main with b==42 then called from test1 with b==24.
test2(int b)7 void test2(int b) {
8   printf("test2(%d)\n", b); // first breakpoint
9   {
10     int c = b * 2;
11     printf("c=%d\n", c); // second breakpoint
12   }
13 }
14 
test1(int a)15 void test1(int a) {
16     printf("test1(%d)\n",  a);
17     test2(a + 1); // third breakpoint
18 }
19 
main(int argc)20 int main(int argc) {
21   test2(42);
22   test1(23);
23   return 0;
24 }
25