diff options
author | Zachary Turner <zturner@google.com> | 2017-03-03 20:21:59 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-03-03 20:21:59 +0000 |
commit | 1e021a162ed10c6b832cbbdd829396d55a0a71c7 (patch) | |
tree | 66b0eb5edb1e83613df712f006550f6d6ca4b09b | |
parent | a04d7ad8518c52cb9bc70c2f58c41685b5001b68 (diff) | |
download | bcm5719-llvm-1e021a162ed10c6b832cbbdd829396d55a0a71c7.tar.gz bcm5719-llvm-1e021a162ed10c6b832cbbdd829396d55a0a71c7.zip |
[Windows] Remove the #include <eh.h> hack.
Prior to MSVC 2015 we had to manually include this header any
time we were going to include <thread> or <future> due to a
bug in MSVC's STL implementation. This has been fixed in MSVC
for some time now, and we require VS 2015 minimum, so we can
remove this across all subprojects.
llvm-svn: 296906
-rw-r--r-- | lld/COFF/Driver.cpp | 5 | ||||
-rw-r--r-- | lldb/include/lldb/Host/msvc/Config.h | 9 | ||||
-rw-r--r-- | lldb/include/lldb/Utility/TaskPool.h | 20 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/make/test_common.h | 8 | ||||
-rw-r--r-- | lldb/tools/driver/Platform.h | 1 | ||||
-rw-r--r-- | lldb/tools/lldb-mi/MIUtilThreadBaseStd.h | 3 | ||||
-rw-r--r-- | lldb/tools/lldb-mi/Platform.h | 1 | ||||
-rw-r--r-- | lldb/unittests/Core/DataExtractorTest.cpp | 7 | ||||
-rw-r--r-- | lldb/unittests/Core/ScalarTest.cpp | 7 | ||||
-rw-r--r-- | lldb/unittests/Core/TimerTest.cpp | 6 | ||||
-rw-r--r-- | lldb/unittests/Expression/GoParserTest.cpp | 7 | ||||
-rw-r--r-- | lldb/unittests/Host/SocketTest.cpp | 7 | ||||
-rw-r--r-- | lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp | 7 | ||||
-rw-r--r-- | lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp | 7 | ||||
-rw-r--r-- | lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp | 7 | ||||
-rw-r--r-- | lldb/unittests/gtest_common.h | 9 | ||||
-rw-r--r-- | llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h | 15 | ||||
-rw-r--r-- | llvm/include/llvm/Support/ThreadPool.h | 15 | ||||
-rw-r--r-- | llvm/include/llvm/Support/thread.h | 14 |
19 files changed, 0 insertions, 155 deletions
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index 07b5f8bea06..369a329ccc0 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -31,11 +31,6 @@ #include <algorithm> #include <memory> -#ifdef _MSC_VER -// <future> depends on <eh.h> for __uncaught_exception. -#include <eh.h> -#endif - #include <future> using namespace llvm; diff --git a/lldb/include/lldb/Host/msvc/Config.h b/lldb/include/lldb/Host/msvc/Config.h index 37dfbf58a85..fa0f8aa7a3a 100644 --- a/lldb/include/lldb/Host/msvc/Config.h +++ b/lldb/include/lldb/Host/msvc/Config.h @@ -27,13 +27,4 @@ //#define LLDB_CONFIG_FCNTL_GETPATH_SUPPORTED 1 -#if _HAS_EXCEPTIONS == 0 -// Due to a bug in <thread>, when _HAS_EXCEPTIONS == 0 the header will try to -// call -// uncaught_exception() without having a declaration for it. The fix for this -// is -// to manually #include <eh.h>, which contains this declaration. -#include <eh.h> -#endif - #endif // #ifndef liblldb_Platform_Config_h_ diff --git a/lldb/include/lldb/Utility/TaskPool.h b/lldb/include/lldb/Utility/TaskPool.h index db15b208171..3ad9c7cfe31 100644 --- a/lldb/include/lldb/Utility/TaskPool.h +++ b/lldb/include/lldb/Utility/TaskPool.h @@ -10,22 +10,6 @@ #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 - -#if defined(_MSC_VER) -// Due to another bug in MSVC 2013, including <future> will generate hundreds of -// warnings in the Concurrency Runtime. This can be removed when we switch to -// MSVC 2015 -#pragma warning(push) -#pragma warning(disable : 4062) -#endif - #include <cassert> #include <cstdint> #include <future> @@ -203,8 +187,4 @@ template <typename T> void TaskRunner<T>::WaitForAllTasks() { ; } -#if defined(_MSC_VER) -#pragma warning(pop) -#endif - #endif // #ifndef utility_TaskPool_h_ diff --git a/lldb/packages/Python/lldbsuite/test/make/test_common.h b/lldb/packages/Python/lldbsuite/test/make/test_common.h index 575ca62c2fc..3ffece26d04 100644 --- a/lldb/packages/Python/lldbsuite/test/make/test_common.h +++ b/lldb/packages/Python/lldbsuite/test/make/test_common.h @@ -10,14 +10,6 @@ #define LLDB_TEST_API #endif -#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 - #if defined(_WIN32) #define LLVM_PRETTY_FUNCTION __FUNCSIG__ #else diff --git a/lldb/tools/driver/Platform.h b/lldb/tools/driver/Platform.h index 3af2e19cbc4..521c5a1ccbb 100644 --- a/lldb/tools/driver/Platform.h +++ b/lldb/tools/driver/Platform.h @@ -15,7 +15,6 @@ #include "lldb/Host/HostGetOpt.h" #include <io.h> #if defined(_MSC_VER) -#include <eh.h> #include <signal.h> #endif #include "lldb/Host/windows/windows.h" diff --git a/lldb/tools/lldb-mi/MIUtilThreadBaseStd.h b/lldb/tools/lldb-mi/MIUtilThreadBaseStd.h index cfff7d459b4..20b8fad9947 100644 --- a/lldb/tools/lldb-mi/MIUtilThreadBaseStd.h +++ b/lldb/tools/lldb-mi/MIUtilThreadBaseStd.h @@ -10,9 +10,6 @@ #pragma once // Third party headers: -#ifdef _MSC_VER -#include <eh.h> -#endif // _MSC_VER #include <mutex> #include <thread> diff --git a/lldb/tools/lldb-mi/Platform.h b/lldb/tools/lldb-mi/Platform.h index 1b6ff554992..ce2de1b6e97 100644 --- a/lldb/tools/lldb-mi/Platform.h +++ b/lldb/tools/lldb-mi/Platform.h @@ -10,7 +10,6 @@ #if defined(_MSC_VER) -#include <eh.h> #include <inttypes.h> #include <io.h> #include <signal.h> diff --git a/lldb/unittests/Core/DataExtractorTest.cpp b/lldb/unittests/Core/DataExtractorTest.cpp index d474e21dc0c..1503baab8cd 100644 --- a/lldb/unittests/Core/DataExtractorTest.cpp +++ b/lldb/unittests/Core/DataExtractorTest.cpp @@ -7,13 +7,6 @@ // //===----------------------------------------------------------------------===// -#if defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0) -// Workaround for MSVC standard library bug, which fails to include <thread> -// when -// exceptions are disabled. -#include <eh.h> -#endif - #include "gtest/gtest.h" #include "lldb/Core/DataExtractor.h" diff --git a/lldb/unittests/Core/ScalarTest.cpp b/lldb/unittests/Core/ScalarTest.cpp index d51d35b59b0..0d473821806 100644 --- a/lldb/unittests/Core/ScalarTest.cpp +++ b/lldb/unittests/Core/ScalarTest.cpp @@ -7,13 +7,6 @@ // //===----------------------------------------------------------------------===// -#if defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0) -// Workaround for MSVC standard library bug, which fails to include <thread> -// when -// exceptions are disabled. -#include <eh.h> -#endif - #include "gtest/gtest.h" #include "lldb/Core/DataExtractor.h" diff --git a/lldb/unittests/Core/TimerTest.cpp b/lldb/unittests/Core/TimerTest.cpp index f7442bf12bd..7e7eeef0a36 100644 --- a/lldb/unittests/Core/TimerTest.cpp +++ b/lldb/unittests/Core/TimerTest.cpp @@ -7,12 +7,6 @@ // //===----------------------------------------------------------------------===// -#if defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0) -// Workaround for MSVC standard library bug, which fails to include <thread> -// when exceptions are disabled. -#include <eh.h> -#endif - #include "lldb/Core/Timer.h" #include "gtest/gtest.h" diff --git a/lldb/unittests/Expression/GoParserTest.cpp b/lldb/unittests/Expression/GoParserTest.cpp index 07eda23bc3a..710dc5e4e86 100644 --- a/lldb/unittests/Expression/GoParserTest.cpp +++ b/lldb/unittests/Expression/GoParserTest.cpp @@ -8,13 +8,6 @@ // //===----------------------------------------------------------------------===// -#if defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0) -// Workaround for MSVC standard library bug, which fails to include <thread> -// when -// exceptions are disabled. -#include <eh.h> -#endif - #include <sstream> #include "gtest/gtest.h" diff --git a/lldb/unittests/Host/SocketTest.cpp b/lldb/unittests/Host/SocketTest.cpp index 569a4404131..7d70b13286b 100644 --- a/lldb/unittests/Host/SocketTest.cpp +++ b/lldb/unittests/Host/SocketTest.cpp @@ -7,13 +7,6 @@ // //===----------------------------------------------------------------------===// -#if defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0) -// Workaround for MSVC standard library bug, which fails to include <thread> -// when -// exceptions are disabled. -#include <eh.h> -#endif - #include <cstdio> #include <functional> #include <thread> diff --git a/lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp b/lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp index 2cfd52f5767..e7d155b2527 100644 --- a/lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp +++ b/lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp @@ -6,13 +6,6 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// - -#if defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0) -// Workaround for MSVC standard library bug, which fails to include <thread> -// when -// exceptions are disabled. -#include <eh.h> -#endif #include <future> #include "GDBRemoteTestUtils.h" diff --git a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp index 2583ee897aa..3c1765c044c 100644 --- a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp +++ b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp @@ -6,13 +6,6 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// - -#if defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0) -// Workaround for MSVC standard library bug, which fails to include <thread> -// when -// exceptions are disabled. -#include <eh.h> -#endif #include <future> #include "GDBRemoteTestUtils.h" diff --git a/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp b/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp index 58cc9f50586..08501f50f65 100644 --- a/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp +++ b/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp @@ -7,13 +7,6 @@ // //===----------------------------------------------------------------------===// -#if defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0) -// Workaround for MSVC standard library bug, which fails to include <thread> -// when -// exceptions are disabled. -#include <eh.h> -#endif - #include "GDBRemoteTestUtils.h" #include "lldb/Host/common/TCPSocket.h" diff --git a/lldb/unittests/gtest_common.h b/lldb/unittests/gtest_common.h index c8fe9257594..f61ba9d0c37 100644 --- a/lldb/unittests/gtest_common.h +++ b/lldb/unittests/gtest_common.h @@ -15,12 +15,3 @@ // This header file is force included by all of LLDB's unittest compilation // units. Be very leary about putting anything in this file. - -#if defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0) -// Due to a bug in <thread>, when _HAS_EXCEPTIONS == 0 the header will try to -// call -// uncaught_exception() without having a declaration for it. The fix for this -// is -// to manually #include <eh.h>, which contains this declaration. -#include <eh.h> -#endif diff --git a/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h index 38ebd5dd3b2..7047261d233 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h @@ -26,23 +26,8 @@ #include "llvm/ExecutionEngine/Orc/OrcError.h" #include "llvm/ExecutionEngine/Orc/RPCSerialization.h" -#ifdef _MSC_VER -// concrt.h depends on eh.h for __uncaught_exception declaration -// even if we disable exceptions. -#include <eh.h> - -// Disable warnings from ppltasks.h transitively included by <future>. -#pragma warning(push) -#pragma warning(disable : 4530) -#pragma warning(disable : 4062) -#endif - #include <future> -#ifdef _MSC_VER -#pragma warning(pop) -#endif - namespace llvm { namespace orc { namespace rpc { diff --git a/llvm/include/llvm/Support/ThreadPool.h b/llvm/include/llvm/Support/ThreadPool.h index 665cec2465b..f0e3ffa0999 100644 --- a/llvm/include/llvm/Support/ThreadPool.h +++ b/llvm/include/llvm/Support/ThreadPool.h @@ -16,23 +16,8 @@ #include "llvm/Support/thread.h" -#ifdef _MSC_VER -// concrt.h depends on eh.h for __uncaught_exception declaration -// even if we disable exceptions. -#include <eh.h> - -// Disable warnings from ppltasks.h transitively included by <future>. -#pragma warning(push) -#pragma warning(disable:4530) -#pragma warning(disable:4062) -#endif - #include <future> -#ifdef _MSC_VER -#pragma warning(pop) -#endif - #include <atomic> #include <condition_variable> #include <functional> diff --git a/llvm/include/llvm/Support/thread.h b/llvm/include/llvm/Support/thread.h index 9c45418df55..787a513d601 100644 --- a/llvm/include/llvm/Support/thread.h +++ b/llvm/include/llvm/Support/thread.h @@ -21,22 +21,8 @@ #if LLVM_ENABLE_THREADS -#ifdef _MSC_VER -// concrt.h depends on eh.h for __uncaught_exception declaration -// even if we disable exceptions. -#include <eh.h> - -// Suppress 'C++ exception handler used, but unwind semantics are not enabled.' -#pragma warning(push) -#pragma warning(disable:4530) -#endif - #include <thread> -#ifdef _MSC_VER -#pragma warning(pop) -#endif - namespace llvm { typedef std::thread thread; } |