diff --git a/libcxxabi/src/demangle/ItaniumDemangle.h b/libcxxabi/src/demangle/ItaniumDemangle.h --- a/libcxxabi/src/demangle/ItaniumDemangle.h +++ b/libcxxabi/src/demangle/ItaniumDemangle.h @@ -61,13 +61,13 @@ if (isInline()) { auto *Tmp = static_cast(std::malloc(NewCap * sizeof(T))); if (Tmp == nullptr) - std::terminate(); + std::abort(); std::copy(First, Last, Tmp); First = Tmp; } else { First = static_cast(std::realloc(First, NewCap * sizeof(T))); if (First == nullptr) - std::terminate(); + std::abort(); } Last = First + S; Cap = First + NewCap; diff --git a/libcxxabi/src/demangle/Utility.h b/libcxxabi/src/demangle/Utility.h --- a/libcxxabi/src/demangle/Utility.h +++ b/libcxxabi/src/demangle/Utility.h @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -49,7 +48,7 @@ BufferCapacity = Need; Buffer = static_cast(std::realloc(Buffer, BufferCapacity)); if (Buffer == nullptr) - std::terminate(); + std::abort(); } } diff --git a/llvm/include/llvm/Demangle/ItaniumDemangle.h b/llvm/include/llvm/Demangle/ItaniumDemangle.h --- a/llvm/include/llvm/Demangle/ItaniumDemangle.h +++ b/llvm/include/llvm/Demangle/ItaniumDemangle.h @@ -55,13 +55,13 @@ if (isInline()) { auto *Tmp = static_cast(std::malloc(NewCap * sizeof(T))); if (Tmp == nullptr) - std::terminate(); + std::abort(); std::copy(First, Last, Tmp); First = Tmp; } else { First = static_cast(std::realloc(First, NewCap * sizeof(T))); if (First == nullptr) - std::terminate(); + std::abort(); } Last = First + S; Cap = First + NewCap; diff --git a/llvm/include/llvm/Demangle/Utility.h b/llvm/include/llvm/Demangle/Utility.h --- a/llvm/include/llvm/Demangle/Utility.h +++ b/llvm/include/llvm/Demangle/Utility.h @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -49,7 +48,7 @@ BufferCapacity = Need; Buffer = static_cast(std::realloc(Buffer, BufferCapacity)); if (Buffer == nullptr) - std::terminate(); + std::abort(); } }