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/src/exception.cpp b/src/exception.cpp
index 9bed6f4..7c52115 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -54,15 +54,21 @@
 void
 std::terminate()
 {
-    try {
+#ifndef _LIBCPP_NO_EXCEPTIONS
+    try
+    {
+#endif
         (*__terminate_handler)();
         // handler should not return
         ::abort ();
+#ifndef _LIBCPP_NO_EXCEPTIONS
     } 
-    catch (...) {
+    catch (...)
+    {
         // handler should not throw exception
         ::abort ();
     }
+#endif
 }