Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / macosx / ctf / test.c
blob358006646e766e6a7af15ca333592152eb3e765c
1 #include <stdio.h>
3 struct ForwardDecl;
5 typedef int MyInt;
7 void populate(MyInt i);
9 typedef enum MyEnum {
10 eOne = 1,
11 eTwo =2,
12 eThree = 3,
13 } MyEnumT;
15 typedef union MyUnion {
16 MyInt i;
17 const char* s;
18 } MyUnionT;
20 typedef struct MyNestedStruct {
21 MyInt i;
22 const char* s;
23 volatile char c;
24 char a[4];
25 MyEnumT e;
26 MyUnionT u;
27 } MyNestedStructT;
29 typedef struct MyStruct {
30 MyNestedStructT n;
31 void (*f)(int);
32 } MyStructT;
34 struct LargeStruct {
35 char buffer[9000];
36 int b;
39 struct RecursiveStruct {
40 struct RecursiveStruct *n;
43 MyStructT foo;
44 struct ForwardDecl *forward;
45 struct LargeStruct bar;
46 struct RecursiveStruct ke;
48 void populate(MyInt i) {
49 foo.n.i = i;
50 foo.n.s = "foo";
51 foo.n.c = 'c';
52 foo.n.a[0] = 'a';
53 foo.n.a[1] = 'b';
54 foo.n.a[2] = 'c';
55 foo.n.a[3] = 'd';
56 foo.n.e = eOne;
57 foo.f = NULL;
58 forward = NULL;
59 bar.b = i;
60 ke.n = NULL;
63 int main(int argc, char** argv) {
64 populate(argc);
65 printf("foo is at address: %p\n", (void*)&foo); // Break here
66 return 0;