[libc++] fix macro redef warning when exception is disabled
Summary:
when setting LIBCXX_ENABLE_EXCEPTIONS=false, _LIBCPP_NO_EXCEPTIONS wil be defined in both commandline and _config
Reviewers: bcraig, EricWF
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19344
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@266956 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/__config b/include/__config
index b82c708..a28a0a4 100644
--- a/include/__config
+++ b/include/__config
@@ -297,7 +297,7 @@
typedef __char32_t char32_t;
#endif
-#if !(__has_feature(cxx_exceptions))
+#if !(__has_feature(cxx_exceptions)) && !defined(_LIBCPP_NO_EXCEPTIONS)
#define _LIBCPP_NO_EXCEPTIONS
#endif