[libcxx-commits] [libcxxabi] [llvm] [ItaniumDemangle] reapply 0e754e114a6 (PR #79488)
Nico Weber via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 25 12:21:01 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/3] [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 5a53a18bcc5fe2c..9057899f7f72325 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 06956f47c1f0b54..8dddc8dd2291155 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/3] 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 9057899f7f72325..9e1a8d3b4fd6862 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 8dddc8dd2291155..9e73986f18fd3a0 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;
>From be17e4b959c8d944648e77f7d7f1ae85f31ba622 Mon Sep 17 00:00:00 2001
From: Nico Weber <thakis at chromium.org>
Date: Thu, 25 Jan 2024 15:20:50 -0500
Subject: [PATCH 3/3] try again with the c++11 compat
---
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 9e1a8d3b4fd6862..1cc1eb977619b75 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::value<T>, "T is required to be a trivial type");
+ static_assert(std::is_trivial<T>::value, "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 9e73986f18fd3a0..4e8d4ae28f4594f 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::value<T>, "T is required to be a trivial type");
+ static_assert(std::is_trivial<T>::value, "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