__throw* functions seem to be available in LLVM 4.0 or above.
authorZonr Chang <zonr.net@gmail.com>
Fri, 6 Jan 2017 23:07:40 +0000 (15:07 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 6 Jan 2017 23:17:54 +0000 (15:17 -0800)
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

folly/portability/BitsFunctexcept.cpp
folly/portability/BitsFunctexcept.h

index 1a52e96f44f3377c88e3eaa41df0fcbbc13a7a93..a8bac63ef17f1f2f4f85c830555844dfec136d12 100644 (file)
@@ -21,7 +21,7 @@
 
 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)
 void __throw_length_error(const char* msg) {
   throw std::length_error(msg);
index 1c4b8c03df370fea9ea37f049622ef1faa1e4f62..7b44197bda7a45fcdb155d082ecb7ecbeb190115 100644 (file)
@@ -25,7 +25,7 @@
 #include <folly/Portability.h>
 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)
 [[noreturn]] void __throw_length_error(const char* msg);
 [[noreturn]] void __throw_logic_error(const char* msg);