summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2015-10-20 16:16:35 +0000
committerTamas Berghammer <tberghammer@google.com>2015-10-20 16:16:35 +0000
commitcdaab620d2111bbb6f6c58338d733291f20b52ce (patch)
tree534469f78b95be0c2900a11e50a18d7858714368
parentda4e8ed69ab887df66627144eecbfb6204f7f2d3 (diff)
downloadbcm5719-llvm-cdaab620d2111bbb6f6c58338d733291f20b52ce.tar.gz
bcm5719-llvm-cdaab620d2111bbb6f6c58338d733291f20b52ce.zip
Fix MSVC build after 250820
Work around a bug in MSVC 12 where _HAS_EXCEPTIONS=0 don't eliminate all usage of __uncaught_exception with including eh.h what declares that function. llvm-svn: 250833
-rw-r--r--lldb/include/lldb/Utility/TaskPool.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/include/lldb/Utility/TaskPool.h b/lldb/include/lldb/Utility/TaskPool.h
index 64ba03dc6eb..99b56a93ff2 100644
--- a/lldb/include/lldb/Utility/TaskPool.h
+++ b/lldb/include/lldb/Utility/TaskPool.h
@@ -10,6 +10,14 @@
#ifndef utility_TaskPool_h_
#define utility_TaskPool_h_
+#if defined(__cplusplus) && defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0)
+// Compiling MSVC libraries with _HAS_EXCEPTIONS=0, eliminates most but not all
+// calls to __uncaught_exception. Unfortunately, it does seem to eliminate
+// the delcaration of __uncaught_excpeiton. Including <eh.h> ensures that it is
+// declared. This may not be necessary after MSVC 12.
+#include <eh.h>
+#endif
+
#include <cassert>
#include <cstdint>
#include <future>
OpenPOWER on IntegriCloud