Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / functionalities / recursion / main.cpp
blob3bd09a9a838062d7b9a59349e507e01a2ec0e57a
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <stdint.h>
5 struct node;
6 struct node {
7 int value;
8 node* next;
9 node () : value(1),next(NULL) {}
10 node (int v) : value(v), next(NULL) {}
13 void make_tree(node* root, int count)
15 int countdown=1;
16 if (!root)
17 return;
18 root->value = countdown;
19 while (count > 0)
21 root->next = new node(++countdown);
22 root = root->next;
23 count--;
27 int main (int argc, const char * argv[])
29 node root(1);
30 make_tree(&root,25000);
31 return 0; // Set break point at this line.