Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / commands / log / basic / main.cpp
blobc883ce82c92ba0db03f0ff5b99b2d8e4d493d01b
1 #include <cstdlib>
2 #include <string>
3 #include <fstream>
4 #include <iostream>
6 int
7 product (int x, int y)
9 int result = x * y;
10 return result;
13 int
14 sum (int a, int b)
16 int result = a + b;
17 return result;
20 int
21 strange_max (int m, int n)
23 if (m > n)
24 return m;
25 else if (n > m)
26 return n;
27 else
28 return 0;
31 int
32 foo (int i, int j)
34 if (strange_max (i, j) == i)
35 return product (i, j);
36 else if (strange_max (i, j) == j)
37 return sum (i, j);
38 else
39 return product (sum (i, i), sum (j, j));
42 int
43 main(int argc, char const *argv[])
46 int array[3];
48 array[0] = foo (1238, 78392);
49 array[1] = foo (379265, 23674);
50 array[2] = foo (872934, 234);
52 return 0;