now works with -fno-exceptions and -fno-rtti

llvm-svn: 110828
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 54b409fdb9489b305bf95f4d4f52b49c7926c429
diff --git a/include/__locale b/include/__locale
index c2146d9..743b393 100644
--- a/include/__locale
+++ b/include/__locale
@@ -134,8 +134,10 @@
 locale
 locale::combine(const locale& __other) const
 {
+#ifndef _LIBCPP_NO_EXCEPTIONS
     if (!_STD::has_facet<_Facet>(__other))
         throw runtime_error("locale::combine: locale missing facet");
+#endif
     return locale(*this, &const_cast<_Facet&>(_STD::use_facet<_Facet>(__other)));
 }