[llvm] [libcxxabi] [ItaniumDemangle] reapply 0e754e114a6 (PR #79488)

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 11:15:05 PST 2024


https://github.com/nico created https://github.com/llvm/llvm-project/pull/79488

It got lost in 50b58e89a122.

>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] [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; }
 



More information about the llvm-commits mailing list