Try 2 - Remove <cstdlib> include from <exception>
This patch removes the `<cstdlib>` include from exception where it is no longer needed. Unlike my previous attempt this patch also adds <cstdlib> where needed in other headers like <new> and <typeinfo>. This won't fix the Firefox build issues discussed on IRC but it is more correct for libc++. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@280754 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -80,10 +80,6 @@ template <class E> void rethrow_if_nested(const E& e);
|
|||||||
#include <__config>
|
#include <__config>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#if defined(_LIBCPP_NO_EXCEPTIONS)
|
|
||||||
#include <cstdio>
|
|
||||||
#include <cstdlib>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
|
|||||||
@@ -69,6 +69,9 @@ void operator delete[](void* ptr, void*) noexcept;
|
|||||||
#include <__config>
|
#include <__config>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#ifdef _LIBCPP_NO_EXCEPTIONS
|
||||||
|
#include <cstdlib>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <__undef___deallocate>
|
#include <__undef___deallocate>
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ public:
|
|||||||
#include <__config>
|
#include <__config>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iosfwd> // for string forward decl
|
#include <iosfwd> // for string forward decl
|
||||||
|
#ifdef _LIBCPP_NO_EXCEPTIONS
|
||||||
|
#include <cstdlib>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ public:
|
|||||||
#include <exception>
|
#include <exception>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#ifdef _LIBCPP_NO_EXCEPTIONS
|
||||||
|
#include <cstdlib>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
|
|||||||
Reference in New Issue
Block a user