Commit 084f9e18 authored by Zonr Chang's avatar Zonr Chang Committed by Facebook Github Bot

__throw* functions seem to be available in LLVM 4.0 or above.

Summary:
__throw* functions exist in master branch but are not included in both
libc++ 3.9.0 and 3.9.1. Expect them to appear in next LLVM release
(which is 4.0).
Closes https://github.com/facebook/folly/pull/536

Reviewed By: yfeldblum, Orvid

Differential Revision: D4377002

Pulled By: smeenai

fbshipit-source-id: 5dd311ca3ec43955f29dd1197fd8fbeb9564a7f6
parent 02cae39d
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
FOLLY_NAMESPACE_STD_BEGIN FOLLY_NAMESPACE_STD_BEGIN
#if (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION < 3900) && \ #if (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION < 4000) && \
!defined(FOLLY_SKIP_LIBCPP_4000_THROW_BACKPORTS) !defined(FOLLY_SKIP_LIBCPP_4000_THROW_BACKPORTS)
void __throw_length_error(const char* msg) { void __throw_length_error(const char* msg) {
throw std::length_error(msg); throw std::length_error(msg);
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <folly/Portability.h> #include <folly/Portability.h>
FOLLY_NAMESPACE_STD_BEGIN FOLLY_NAMESPACE_STD_BEGIN
#if (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION < 3900) && \ #if (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION < 4000) && \
!defined(FOLLY_SKIP_LIBCPP_4000_THROW_BACKPORTS) !defined(FOLLY_SKIP_LIBCPP_4000_THROW_BACKPORTS)
[[noreturn]] void __throw_length_error(const char* msg); [[noreturn]] void __throw_length_error(const char* msg);
[[noreturn]] void __throw_logic_error(const char* msg); [[noreturn]] void __throw_logic_error(const char* msg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment