[libcxx-commits] [libcxxabi] [llvm] [ItaniumDemangle] reapply 0e754e114a6 (PR #79488)
Nico Weber via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 25 12:16:31 PST 2024
https://github.com/nico updated https://github.com/llvm/llvm-project/pull/79488
>From dcc4ed61320be1b0e61dd6ef45b90aed36e90dd0 Mon Sep 17 00:00:00 2001
From: Nico Weber <thakis at chromium.org>
Date: Thu, 25 Jan 2024 14:14:17 -0500
Subject: [PATCH 1/2] [ItaniumDemangle] reapply 0e754e114a6
It got lost in 50b58e89a122.
---
libcxxabi/src/demangle/ItaniumDemangle.h | 6 ++----
llvm/include/llvm/Demangle/ItaniumDemangle.h | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/libcxxabi/src/demangle/ItaniumDemangle.h b/libcxxabi/src/demangle/ItaniumDemangle.h
index 5a53a18bcc5fe2..9057899f7f7232 100644
--- a/libcxxabi/src/demangle/ItaniumDemangle.h
+++ b/libcxxabi/src/demangle/ItaniumDemangle.h
@@ -39,13 +39,11 @@
DEMANGLE_NAMESPACE_BEGIN
template <class T, size_t N> class PODSmallVector {
- static_assert(std::is_pod<T>::value,
- "T is required to be a plain old data type");
-
+ static_assert(std::is_trivial_v<T>, "T is required to be a trivial type");
T *First = nullptr;
T *Last = nullptr;
T *Cap = nullptr;
- T Inline[N] = {0};
+ T Inline[N] = {};
bool isInline() const { return First == Inline; }
diff --git a/llvm/include/llvm/Demangle/ItaniumDemangle.h b/llvm/include/llvm/Demangle/ItaniumDemangle.h
index 06956f47c1f0b5..8dddc8dd229115 100644
--- a/llvm/include/llvm/Demangle/ItaniumDemangle.h
+++ b/llvm/include/llvm/Demangle/ItaniumDemangle.h
@@ -38,13 +38,11 @@
DEMANGLE_NAMESPACE_BEGIN
template <class T, size_t N> class PODSmallVector {
- static_assert(std::is_pod<T>::value,
- "T is required to be a plain old data type");
-
+ static_assert(std::is_trivial_v<T>, "T is required to be a trivial type");
T *First = nullptr;
T *Last = nullptr;
T *Cap = nullptr;
- T Inline[N] = {0};
+ T Inline[N] = {};
bool isInline() const { return First == Inline; }
>From cd979462b76a91c093d4d8b1368f2a065965a483 Mon Sep 17 00:00:00 2001
From: Nico Weber <thakis at chromium.org>
Date: Thu, 25 Jan 2024 15:16:18 -0500
Subject: [PATCH 2/2] c++11 compat for
libcxxabi/test/unittest_demangle.pass.cpp
---
libcxxabi/src/demangle/ItaniumDemangle.h | 2 +-
llvm/include/llvm/Demangle/ItaniumDemangle.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libcxxabi/src/demangle/ItaniumDemangle.h b/libcxxabi/src/demangle/ItaniumDemangle.h
index 9057899f7f7232..9e1a8d3b4fd686 100644
--- a/libcxxabi/src/demangle/ItaniumDemangle.h
+++ b/libcxxabi/src/demangle/ItaniumDemangle.h
@@ -39,7 +39,7 @@
DEMANGLE_NAMESPACE_BEGIN
template <class T, size_t N> class PODSmallVector {
- static_assert(std::is_trivial_v<T>, "T is required to be a trivial type");
+ static_assert(std::is_trivial::value<T>, "T is required to be a trivial type");
T *First = nullptr;
T *Last = nullptr;
T *Cap = nullptr;
diff --git a/llvm/include/llvm/Demangle/ItaniumDemangle.h b/llvm/include/llvm/Demangle/ItaniumDemangle.h
index 8dddc8dd229115..9e73986f18fd3a 100644
--- a/llvm/include/llvm/Demangle/ItaniumDemangle.h
+++ b/llvm/include/llvm/Demangle/ItaniumDemangle.h
@@ -38,7 +38,7 @@
DEMANGLE_NAMESPACE_BEGIN
template <class T, size_t N> class PODSmallVector {
- static_assert(std::is_trivial_v<T>, "T is required to be a trivial type");
+ static_assert(std::is_trivial::value<T>, "T is required to be a trivial type");
T *First = nullptr;
T *Last = nullptr;
T *Cap = nullptr;
More information about the libcxx-commits
mailing list