1#include <stdio.h>
2
3
4int f1 (char *s);
5int f2 (char *s);
6int f3 (char *s);
7
8
9// We want f1 to start on line 20
10int f1 (char *s)
11{
12 return printf(format: "f1: %s\n", s);
13}
14
15
16
17
18
19// We want f2 to start on line 30, this should get stripped
20int f2 (char *s)
21{
22 return printf(format: "f2: %s\n", s);
23}
24
25
26
27
28
29// We want f3 to start on line 40
30int f3 (char *s)
31{
32 return printf(format: "f3: %s\n", s);
33}
34
35
36
37
38
39// We want main to start on line 50
40int main (int argc, const char * argv[])
41{
42 f1(s: "carp");
43 f3(s: "dong");
44 return 0;
45}
46

source code of lldb/test/API/functionalities/dead-strip/main.c