[ORC] Fail materialization in tasks that are destroyed before running.
[llvm-project.git] / lldb / test / API / lldbutil-tests / failed-to-hit-breakpoint / main.cpp
blob267f247b6228511e5ff05cf5be2703c257a80648
1 #include <iostream>
2 #include <thread>
4 int main(int argc, char **argv) {
5 // Print the string that the test looks for to make sure stdout and stderr
6 // got recorded.
7 std::cout << "stdout_needle" << std::flush;
8 std::cerr << "stderr_needle" << std::flush;
10 // Work around a timing issue that sometimes prevents stderr from being
11 // captured.
12 std::this_thread::sleep_for(std::chrono::seconds(1));
14 // This is unreachable during normal test execution as we don't pass any
15 // (or +100) arguments. This still needs to be theoretically reachable code
16 // so that the compiler will generate code for this (that we can set a
17 // breakpoint on).
18 if (argc > 100)
19 return 1; // break here
20 return 0;