summaryrefslogtreecommitdiffstats
path: root/libcxx/src
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2013-10-06 22:13:24 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2013-10-06 22:13:24 +0000
commit8b9c5d1ac71d2f0465550c3d13ace447e4dc14ac (patch)
tree08499cb21dc625e7aff75933f93691946b0b7301 /libcxx/src
parent3b5d969293026eed9b6444eddb1ce48a8615a11f (diff)
downloadbcm5719-llvm-8b9c5d1ac71d2f0465550c3d13ace447e4dc14ac.tar.gz
bcm5719-llvm-8b9c5d1ac71d2f0465550c3d13ace447e4dc14ac.zip
Silence the unused function warning in exception.cpp.
Rather than try to protect the function behind a precise, ever-changing #if expression, just inline it into every caller. llvm-svn: 192077
Diffstat (limited to 'libcxx/src')
-rw-r--r--libcxx/src/exception.cpp33
1 files changed, 16 insertions, 17 deletions
diff --git a/libcxx/src/exception.cpp b/libcxx/src/exception.cpp
index e080f7c8e51..9dbb1fae790 100644
--- a/libcxx/src/exception.cpp
+++ b/libcxx/src/exception.cpp
@@ -1,5 +1,3 @@
-
-
//===------------------------ exception.cpp -------------------------------===//
//
// The LLVM Compiler Infrastructure
@@ -42,13 +40,6 @@
static std::unexpected_handler __unexpected_handler;
#endif // __has_include(<cxxabi.h>)
-_LIBCPP_NORETURN
-static void _libcpp_abort(const char* msg)
-{
- printf("%s\n", msg);
- abort();
-}
-
namespace std
{
@@ -99,13 +90,15 @@ terminate() _NOEXCEPT
#endif // _LIBCPP_NO_EXCEPTIONS
(*get_terminate())();
// handler should not return
- _libcpp_abort("terminate_handler unexpectedly returned\n");
+ printf("terminate_handler unexpectedly returned\n");
+ ::abort();
#ifndef _LIBCPP_NO_EXCEPTIONS
}
catch (...)
{
// handler should not throw exception
- _libcpp_abort("terminate_handler unexpectedly threw an exception\n");
+ printf("terminate_handler unexpectedly threw an exception\n");
+ ::abort();
}
#endif // _LIBCPP_NO_EXCEPTIONS
}
@@ -124,7 +117,8 @@ bool uncaught_exception() _NOEXCEPT
# else
# warning uncaught_exception not yet implemented
# endif
- _libcpp_abort("uncaught_exception not yet implemented\n");
+ printf("uncaught_exception not yet implemented\n");
+ ::abort();
#endif // __APPLE__
}
@@ -196,7 +190,8 @@ exception_ptr::~exception_ptr() _NOEXCEPT
# else
# warning exception_ptr not yet implemented
# endif
- _libcpp_abort("exception_ptr not yet implemented\n");
+ printf("exception_ptr not yet implemented\n");
+ ::abort();
#endif
}
@@ -214,7 +209,8 @@ exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT
# else
# warning exception_ptr not yet implemented
# endif
- _libcpp_abort("exception_ptr not yet implemented\n");
+ printf("exception_ptr not yet implemented\n");
+ ::abort();
#endif
}
@@ -238,7 +234,8 @@ exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT
# else
# warning exception_ptr not yet implemented
# endif
- _libcpp_abort("exception_ptr not yet implemented\n");
+ printf("exception_ptr not yet implemented\n");
+ ::abort();
#endif
}
@@ -281,7 +278,8 @@ exception_ptr current_exception() _NOEXCEPT
# else
# warning exception_ptr not yet implemented
# endif
- _libcpp_abort("exception_ptr not yet implemented\n");
+ printf("exception_ptr not yet implemented\n");
+ ::abort();
#endif
}
@@ -302,7 +300,8 @@ void rethrow_exception(exception_ptr p)
# else
# warning exception_ptr not yet implemented
# endif
- _libcpp_abort("exception_ptr not yet implemented\n");
+ printf("exception_ptr not yet implemented\n");
+ ::abort();
#endif
}
} // std
OpenPOWER on IntegriCloud