[compiler-rt] [scudo] Add static vector functionality. (PR #98986)

Joshua Baehring via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 17 14:03:21 PDT 2024


================
@@ -116,18 +117,19 @@ template <typename T> class VectorNoCtor {
   uptr CapacityBytes = 0;
   uptr Size = 0;
 
-  T LocalData[256 / sizeof(T)] = {};
+  T LocalData[StaticNumEntries] = {};
   MemMapT ExternalBuffer;
 };
 
-template <typename T> class Vector : public VectorNoCtor<T> {
+template <typename T, size_t StaticNumEntries>
+class Vector : public VectorNoCtor<T, Max<size_t>(1, StaticNumEntries)> {
----------------
JoshuaMBa wrote:

Fixed.

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


More information about the llvm-commits mailing list