From a74d34a8a95330342b452de576e3a6f1ca7fb699 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Thu, 27 Aug 2015 21:52:31 +0000 Subject: [PATCH] Support: Introduce thread.h. This header is a wrapper for 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 --- include/llvm/Support/thread.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 include/llvm/Support/thread.h diff --git a/include/llvm/Support/thread.h b/include/llvm/Support/thread.h new file mode 100644 index 00000000000..b61177d5989 --- /dev/null +++ b/include/llvm/Support/thread.h @@ -0,0 +1,34 @@ +//===-- llvm/Support/thread.h - Wrapper for ------------*- 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 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 + +// Suppress 'C++ exception handler used, but unwind semantics are not enabled.' +#pragma warning(push) +#pragma warning(disable:4530) +#endif + +#include + +#ifdef _MSC_VER +#pragma warning(pop) +#endif + +#endif -- 2.34.1