[Lldb-commits] [lldb] r296906 - [Windows] Remove the #include <eh.h> hack.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 3 12:22:00 PST 2017


Author: zturner
Date: Fri Mar  3 14:21:59 2017
New Revision: 296906

URL: http://llvm.org/viewvc/llvm-project?rev=296906&view=rev
Log:
[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.

Modified:
    lldb/trunk/include/lldb/Host/msvc/Config.h
    lldb/trunk/include/lldb/Utility/TaskPool.h
    lldb/trunk/packages/Python/lldbsuite/test/make/test_common.h
    lldb/trunk/tools/driver/Platform.h
    lldb/trunk/tools/lldb-mi/MIUtilThreadBaseStd.h
    lldb/trunk/tools/lldb-mi/Platform.h
    lldb/trunk/unittests/Core/DataExtractorTest.cpp
    lldb/trunk/unittests/Core/ScalarTest.cpp
    lldb/trunk/unittests/Core/TimerTest.cpp
    lldb/trunk/unittests/Expression/GoParserTest.cpp
    lldb/trunk/unittests/Host/SocketTest.cpp
    lldb/trunk/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp
    lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
    lldb/trunk/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp
    lldb/trunk/unittests/gtest_common.h

Modified: lldb/trunk/include/lldb/Host/msvc/Config.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/msvc/Config.h?rev=296906&r1=296905&r2=296906&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/msvc/Config.h (original)
+++ lldb/trunk/include/lldb/Host/msvc/Config.h Fri Mar  3 14:21:59 2017
@@ -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_

Modified: lldb/trunk/include/lldb/Utility/TaskPool.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/TaskPool.h?rev=296906&r1=296905&r2=296906&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/TaskPool.h (original)
+++ lldb/trunk/include/lldb/Utility/TaskPool.h Fri Mar  3 14:21:59 2017
@@ -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>
     ;
 }
 
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif
-
 #endif // #ifndef utility_TaskPool_h_

Modified: lldb/trunk/packages/Python/lldbsuite/test/make/test_common.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/make/test_common.h?rev=296906&r1=296905&r2=296906&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/make/test_common.h (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/make/test_common.h Fri Mar  3 14:21:59 2017
@@ -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

Modified: lldb/trunk/tools/driver/Platform.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Platform.h?rev=296906&r1=296905&r2=296906&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Platform.h (original)
+++ lldb/trunk/tools/driver/Platform.h Fri Mar  3 14:21:59 2017
@@ -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"

Modified: lldb/trunk/tools/lldb-mi/MIUtilThreadBaseStd.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIUtilThreadBaseStd.h?rev=296906&r1=296905&r2=296906&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MIUtilThreadBaseStd.h (original)
+++ lldb/trunk/tools/lldb-mi/MIUtilThreadBaseStd.h Fri Mar  3 14:21:59 2017
@@ -10,9 +10,6 @@
 #pragma once
 
 // Third party headers:
-#ifdef _MSC_VER
-#include <eh.h>
-#endif // _MSC_VER
 #include <mutex>
 #include <thread>
 

Modified: lldb/trunk/tools/lldb-mi/Platform.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/Platform.h?rev=296906&r1=296905&r2=296906&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/Platform.h (original)
+++ lldb/trunk/tools/lldb-mi/Platform.h Fri Mar  3 14:21:59 2017
@@ -10,7 +10,6 @@
 
 #if defined(_MSC_VER)
 
-#include <eh.h>
 #include <inttypes.h>
 #include <io.h>
 #include <signal.h>

Modified: lldb/trunk/unittests/Core/DataExtractorTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Core/DataExtractorTest.cpp?rev=296906&r1=296905&r2=296906&view=diff
==============================================================================
--- lldb/trunk/unittests/Core/DataExtractorTest.cpp (original)
+++ lldb/trunk/unittests/Core/DataExtractorTest.cpp Fri Mar  3 14:21:59 2017
@@ -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"

Modified: lldb/trunk/unittests/Core/ScalarTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Core/ScalarTest.cpp?rev=296906&r1=296905&r2=296906&view=diff
==============================================================================
--- lldb/trunk/unittests/Core/ScalarTest.cpp (original)
+++ lldb/trunk/unittests/Core/ScalarTest.cpp Fri Mar  3 14:21:59 2017
@@ -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"

Modified: lldb/trunk/unittests/Core/TimerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Core/TimerTest.cpp?rev=296906&r1=296905&r2=296906&view=diff
==============================================================================
--- lldb/trunk/unittests/Core/TimerTest.cpp (original)
+++ lldb/trunk/unittests/Core/TimerTest.cpp Fri Mar  3 14:21:59 2017
@@ -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"
 

Modified: lldb/trunk/unittests/Expression/GoParserTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Expression/GoParserTest.cpp?rev=296906&r1=296905&r2=296906&view=diff
==============================================================================
--- lldb/trunk/unittests/Expression/GoParserTest.cpp (original)
+++ lldb/trunk/unittests/Expression/GoParserTest.cpp Fri Mar  3 14:21:59 2017
@@ -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"

Modified: lldb/trunk/unittests/Host/SocketTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Host/SocketTest.cpp?rev=296906&r1=296905&r2=296906&view=diff
==============================================================================
--- lldb/trunk/unittests/Host/SocketTest.cpp (original)
+++ lldb/trunk/unittests/Host/SocketTest.cpp Fri Mar  3 14:21:59 2017
@@ -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>

Modified: lldb/trunk/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp?rev=296906&r1=296905&r2=296906&view=diff
==============================================================================
--- lldb/trunk/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp (original)
+++ lldb/trunk/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp Fri Mar  3 14:21:59 2017
@@ -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"

Modified: lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp?rev=296906&r1=296905&r2=296906&view=diff
==============================================================================
--- lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp (original)
+++ lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp Fri Mar  3 14:21:59 2017
@@ -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"

Modified: lldb/trunk/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp?rev=296906&r1=296905&r2=296906&view=diff
==============================================================================
--- lldb/trunk/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp (original)
+++ lldb/trunk/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp Fri Mar  3 14:21:59 2017
@@ -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"

Modified: lldb/trunk/unittests/gtest_common.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/gtest_common.h?rev=296906&r1=296905&r2=296906&view=diff
==============================================================================
--- lldb/trunk/unittests/gtest_common.h (original)
+++ lldb/trunk/unittests/gtest_common.h Fri Mar  3 14:21:59 2017
@@ -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




More information about the lldb-commits mailing list