[clang] [llvm] [llvm][clang] Remove `llvm::OwningArrayRef` (PR #169126)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 21 18:07:55 PST 2025


================
@@ -246,17 +246,17 @@ class VTableLayout {
   // point for a given vtable index.
   typedef llvm::SmallVector<unsigned, 4> AddressPointsIndexMapTy;
 
+  using VTableIndicesTy = llvm::SmallVector<std::size_t>;
+
 private:
-  // Stores the component indices of the first component of each virtual table in
-  // the virtual table group. To save a little memory in the common case where
-  // the vtable group contains a single vtable, an empty vector here represents
-  // the vector {0}.
-  OwningArrayRef<size_t> VTableIndices;
+  // Stores the component indices of the first component of each virtual table
+  // in the virtual table group.
+  VTableIndicesTy VTableIndices;
 
-  OwningArrayRef<VTableComponent> VTableComponents;
+  std::vector<VTableComponent> VTableComponents;
----------------
kuhar wrote:

Why not SmallVector?

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


More information about the llvm-commits mailing list