Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / python_api / hello_world / main.c
blobc516f923614f11a62880b1b0fec81ec6516c1eeb
1 #include <stdio.h>
2 #ifdef _MSC_VER
3 #include <windows.h>
4 #define sleep(x) Sleep((x) * 1000)
5 #else
6 #include <unistd.h>
7 #endif
9 int main(int argc, char const *argv[])
11 lldb_enable_attach();
13 printf("Hello world.\n"); // Set break point at this line.
14 if (argc == 1)
15 return 1;
17 // Create the synchronization token.
18 FILE *f;
19 if (f = fopen(argv[1], "wx")) {
20 fputs("\n", f);
21 fflush(f);
22 fclose(f);
23 } else
24 return 1;
26 // Waiting to be attached by the debugger, otherwise.
27 while (1)
28 sleep(1); // Waiting to be attached...