Fix Windows build after llgs upstream.
authorZachary Turner <zturner@google.com>
Tue, 1 Jul 2014 00:18:46 +0000 (00:18 +0000)
committerZachary Turner <zturner@google.com>
Tue, 1 Jul 2014 00:18:46 +0000 (00:18 +0000)
With _HAS_EXCEPTIONS=0, Windows' version of <thread> will fail to
compile because it calls __uncaught_exception(), which is compiled
out due to _HAS_EXCEPTIONS=0.  This just creates a stub version
of __uncaught_exception() which always fails.

llvm-svn: 212076

lldb/include/lldb/Host/msvc/Config.h
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp

index cdf6f21..bdf404c 100644 (file)
@@ -27,4 +27,9 @@
 
 //#define LLDB_CONFIG_FCNTL_GETPATH_SUPPORTED 1
 
+#if _HAS_EXCEPTIONS == 0
+// Exceptions are disabled so this isn't defined, but concrt assumes it is.
+static void *__uncaught_exception() { return nullptr; }
+#endif
+
 #endif // #ifndef liblldb_Platform_Config_h_
index e59cf34..9275ddc 100644 (file)
@@ -9,6 +9,8 @@
 
 #include <errno.h>
 
+#include "lldb/Host/Config.h"
+
 #include "GDBRemoteCommunicationServer.h"
 #include "lldb/Core/StreamGDBRemote.h"