[llvm] r296906 - [Windows] Remove the #include <eh.h> hack.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 12:22:01 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:
    llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h
    llvm/trunk/include/llvm/Support/ThreadPool.h
    llvm/trunk/include/llvm/Support/thread.h

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

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

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




More information about the llvm-commits mailing list