1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00

Support: Introduce thread.h.

This header is a wrapper for <thread> that works around problems with the
MSVC headers when exceptions are disabled.

llvm-svn: 246218
This commit is contained in:
Peter Collingbourne 2015-08-27 21:52:31 +00:00
parent 1b9d52c280
commit 50a707671a

View File

@ -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