[libcxx] r266956 - [libc++] fix macro redef warning when exception is disabled

Weiming Zhao via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 20 22:28:19 PDT 2016


Author: weimingz
Date: Thu Apr 21 00:28:18 2016
New Revision: 266956

URL: http://llvm.org/viewvc/llvm-project?rev=266956&view=rev
Log:
[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

Modified:
    libcxx/trunk/include/__config

Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=266956&r1=266955&r2=266956&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Thu Apr 21 00:28:18 2016
@@ -297,7 +297,7 @@ typedef __char16_t char16_t;
 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
 




More information about the cfe-commits mailing list