Split <setjmp.h> out of <csetjmp>.

llvm-svn: 249743
This commit is contained in:
Richard Smith 2015-10-08 20:41:26 +00:00
parent 524956bb3d
commit 38a2a28ff7
3 changed files with 44 additions and 4 deletions

View File

@ -38,10 +38,6 @@ void longjmp(jmp_buf env, int val);
#pragma GCC system_header
#endif
#ifndef setjmp
#define setjmp(env) setjmp(env)
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
using ::jmp_buf;

40
libcxx/include/setjmp.h Normal file
View File

@ -0,0 +1,40 @@
// -*- C++ -*-
//===--------------------------- setjmp.h ---------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP_SETJMP_H
#define _LIBCPP_SETJMP_H
/*
setjmp.h synopsis
Macros:
setjmp
Types:
jmp_buf
void longjmp(jmp_buf env, int val);
*/
#include <__config>
#include_next <setjmp.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
#ifndef setjmp
#define setjmp(env) setjmp(env)
#endif
#endif // _LIBCPP_SETJMP_H

View File

@ -12,6 +12,10 @@
#include <setjmp.h>
#include <type_traits>
#ifndef setjmp
#error setjmp not defined
#endif
int main()
{
jmp_buf jb;