[libcxx-commits] [libcxx] 69ca17a - [libc++] NFC: Simplify incude of <cstdlib>

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 11 14:05:05 PST 2020


Author: Louis Dionne
Date: 2020-11-11T17:04:32-05:00
New Revision: 69ca17a92c20b3c01d55ea31331580625f37c168

URL: https://github.com/llvm/llvm-project/commit/69ca17a92c20b3c01d55ea31331580625f37c168
DIFF: https://github.com/llvm/llvm-project/commit/69ca17a92c20b3c01d55ea31331580625f37c168.diff

LOG: [libc++] NFC: Simplify incude of <cstdlib>

We include <exception>, which includes <cstdlib> unconditionally anyway.

Added: 
    

Modified: 
    libcxx/include/stdexcept

Removed: 
    


################################################################################
diff  --git a/libcxx/include/stdexcept b/libcxx/include/stdexcept
index 7a7f36794099..7b5de7ea367c 100644
--- a/libcxx/include/stdexcept
+++ b/libcxx/include/stdexcept
@@ -42,11 +42,9 @@ public:
 */
 
 #include <__config>
+#include <cstdlib>
 #include <exception>
 #include <iosfwd>  // for string forward decl
-#ifdef _LIBCPP_NO_EXCEPTIONS
-#include <cstdlib>
-#endif
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header


        


More information about the libcxx-commits mailing list