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

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 25 11:15:38 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxxabi

Author: Nico Weber (nico)

<details>
<summary>Changes</summary>

It got lost in 50b58e89a122.

---
Full diff: https://github.com/llvm/llvm-project/pull/79488.diff


2 Files Affected:

- (modified) libcxxabi/src/demangle/ItaniumDemangle.h (+2-4) 
- (modified) llvm/include/llvm/Demangle/ItaniumDemangle.h (+2-4) 


``````````diff
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; }
 

``````````

</details>


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


More information about the libcxx-commits mailing list