[PATCH] Added data() and capacity() getters to InternalVector.

Sergey Matveev earthdok at google.com
Mon Apr 1 06:54:15 PDT 2013


Hi kcc, glider, samsonov,

Same interface as in STL. Needed for LSan.

http://llvm-reviews.chandlerc.com/D602

Files:
  lib/sanitizer_common/sanitizer_common.h

Index: lib/sanitizer_common/sanitizer_common.h
===================================================================
--- lib/sanitizer_common/sanitizer_common.h
+++ lib/sanitizer_common/sanitizer_common.h
@@ -308,6 +308,12 @@
   uptr size() const {
     return size_;
   }
+  const T *data() const {
+    return data_;
+  }
+  uptr capacity() const {
+    return capacity_;
+  }
 
  private:
   void Resize(uptr new_capacity) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D602.1.patch
Type: text/x-patch
Size: 426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130401/b5ef3459/attachment.bin>


More information about the llvm-commits mailing list