forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This header is a wrapper for <thread> that works around problems with the MSVC headers when exceptions are disabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246218 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//===-- llvm/Support/thread.h - Wrapper for <thread> ------------*- C++ -*-===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is distributed under the University of Illinois Open Source | ||
// License. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This header is a wrapper for <thread> that works around problems with the | ||
// MSVC headers when exceptions are disabled. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef LLVM_SUPPORT_THREAD_H | ||
#define 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> | ||
|
||
// 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 | ||
|
||
#endif |