[llvm] [PBQP] Add begin and end to Vector (NFC) (PR #136454)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 19 13:01:18 PDT 2025


================
@@ -48,12 +48,18 @@ class Vector {
     V.Length = 0;
   }
 
+  // Iterator-based access.
+  const PBQPNum *begin() const { return Data.get(); }
+  const PBQPNum *end() const { return Data.get() + Length; }
+  PBQPNum *begin() { return Data.get(); }
+  PBQPNum *end() { return Data.get() + Length; }
----------------
kuhar wrote:

Should we use this in the constructors above?

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


More information about the llvm-commits mailing list