diff options
author | Zachary Turner <zturner@google.com> | 2014-08-13 17:44:53 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2014-08-13 17:44:53 +0000 |
commit | c7826524acda6a9c8816261d5c48b94dc92935ed (patch) | |
tree | 86275ba20aba854402e8af66d6c4b753093a7481 /lldb/test/python_api/signals/main.cpp | |
parent | d3d657ca0f2018d242345075bbe80c68922074f9 (diff) | |
download | bcm5719-llvm-c7826524acda6a9c8816261d5c48b94dc92935ed.tar.gz bcm5719-llvm-c7826524acda6a9c8816261d5c48b94dc92935ed.zip |
Get test executables compiling on Windows.
Many of the test executables use pthreads directly. This isn't
portable on Windows, so this patch converts these test to use
C++11 threads and mutexes. Since Windows' implementation of
std::thread classes throw and catch from header files, this patch
also disables exceptions when compiling with clang on Windows.
Reviewed by: Todd Fiala, Ed Maste
Differential Revision: http://reviews.llvm.org/D4816
llvm-svn: 215562
Diffstat (limited to 'lldb/test/python_api/signals/main.cpp')
-rw-r--r-- | lldb/test/python_api/signals/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/test/python_api/signals/main.cpp b/lldb/test/python_api/signals/main.cpp index ddd2ffe5fb2..81924f435a1 100644 --- a/lldb/test/python_api/signals/main.cpp +++ b/lldb/test/python_api/signals/main.cpp @@ -8,13 +8,21 @@ //===----------------------------------------------------------------------===// #include <stdio.h> #include <sys/types.h> +#if defined(_WIN32) +#include <windows.h> +#else #include <unistd.h> #include <signal.h> +#endif // This simple program is to test the lldb Python API related to process. int main (int argc, char const *argv[]) { +#if defined(_WIN32) + ::ExitProcess(1); +#else kill(getpid(), SIGINT); // Set break point at this line and setup signal ignores. +#endif return 0; } |