Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / Shell / Expr / Inputs / call-function.cpp
blobcc5f52dbf5670487a884acc416cdcc149b932aaf
1 #include <iostream>
2 #include <string>
3 #include <cstring>
5 struct Five
7 int number;
8 const char *name;
9 };
11 Five
12 returnsFive()
14 Five my_five = {5, "five"};
15 return my_five;
18 unsigned int
19 fib(unsigned int n)
21 if (n < 2)
22 return n;
23 else
24 return fib(n - 1) + fib(n - 2);
27 int
28 add(int a, int b)
30 return a + b;
33 bool
34 stringCompare(const char *str)
36 if (strcmp( str, "Hello world" ) == 0)
37 return true;
38 else
39 return false;
42 int main (int argc, char const *argv[])
44 std::string str = "Hello world";
45 std::cout << str << std::endl;
46 std::cout << str.c_str() << std::endl;
47 Five main_five = returnsFive();
48 #if 0
49 print str
50 print str.c_str()
51 #endif
52 return 0; // Please test these expressions while stopped at this line: