b61177d59891bb8a33f9ffd1b4ba59a2f89862ab
[oota-llvm.git] / include / llvm / Support / thread.h
1 //===-- llvm/Support/thread.h - Wrapper for <thread> ------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This header is a wrapper for <thread> that works around problems with the
11 // MSVC headers when exceptions are disabled.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_SUPPORT_THREAD_H
16 #define LLVM_SUPPORT_THREAD_H
17
18 #ifdef _MSC_VER
19 // concrt.h depends on eh.h for __uncaught_exception declaration
20 // even if we disable exceptions.
21 #include <eh.h>
22
23 // Suppress 'C++ exception handler used, but unwind semantics are not enabled.'
24 #pragma warning(push)
25 #pragma warning(disable:4530)
26 #endif
27
28 #include <thread>
29
30 #ifdef _MSC_VER
31 #pragma warning(pop)
32 #endif
33
34 #endif