summaryrefslogtreecommitdiffstats
path: root/libcxx/include/exception
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2010-08-11 17:04:31 +0000
committerHoward Hinnant <hhinnant@apple.com>2010-08-11 17:04:31 +0000
commit54b409fdb9489b305bf95f4d4f52b49c7926c429 (patch)
tree4e1c893fe8a940ea767c4eef990dff879fcbbd25 /libcxx/include/exception
parent37aab7674a74dd0224b14976e91f89abe48e9ae9 (diff)
downloadbcm5719-llvm-54b409fdb9489b305bf95f4d4f52b49c7926c429.tar.gz
bcm5719-llvm-54b409fdb9489b305bf95f4d4f52b49c7926c429.zip
now works with -fno-exceptions and -fno-rtti
llvm-svn: 110828
Diffstat (limited to 'libcxx/include/exception')
-rw-r--r--libcxx/include/exception6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxx/include/exception b/libcxx/include/exception
index 51e83136b2f..772ada4eadc 100644
--- a/libcxx/include/exception
+++ b/libcxx/include/exception
@@ -141,6 +141,7 @@ template<class _E>
exception_ptr
make_exception_ptr(_E __e)
{
+#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
throw __e;
@@ -149,6 +150,7 @@ make_exception_ptr(_E __e)
{
return current_exception();
}
+#endif
}
// nested_exception
@@ -188,7 +190,9 @@ throw_with_nested (_Tp& __t, typename enable_if<
>::type* = 0)
#endif
{
+#ifndef _LIBCPP_NO_EXCEPTIONS
throw __nested<typename remove_reference<_Tp>::type>(_STD::forward<_Tp>(__t));
+#endif
}
template <class _Tp>
@@ -204,7 +208,9 @@ throw_with_nested (_Tp& __t, typename enable_if<
>::type* = 0)
#endif
{
+#ifndef _LIBCPP_NO_EXCEPTIONS
throw _STD::forward<_Tp>(__t);
+#endif
}
template <class _E>
OpenPOWER on IntegriCloud