Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled.  Reviewed as: https://reviews.llvm.org/D23855.

llvm-svn: 279744
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: d437fa5c8c1185af695b87cdd5ea83aa4a6e7382
diff --git a/src/new.cpp b/src/new.cpp
index f4f73d8..d5db461 100644
--- a/src/new.cpp
+++ b/src/new.cpp
@@ -241,6 +241,8 @@
 {
 #ifndef _LIBCPP_NO_EXCEPTIONS
     throw bad_alloc();
+#else
+    _VSTD::abort();
 #endif
 }