diff options
author | Vitaly Buka <vitalybuka@google.com> | 2018-05-07 01:08:13 +0000 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2018-05-07 01:08:13 +0000 |
commit | 16037b7ea1bb446c193e591bc8219c5a1b0af919 (patch) | |
tree | bcbfdc66cb1cb845e191a619e5d13d9020c7a34e /lib/sanitizer_common/sanitizer_common.h | |
parent | 39401bf064ee0b5ab39ceb4cedca9bba3644df5c (diff) | |
download | compiler-rt-16037b7ea1bb446c193e591bc8219c5a1b0af919.tar.gz |
[sanitizer] Make InternalScopedBuffer::size() behavior similar to vector.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@331612 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_common.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_common.h b/lib/sanitizer_common/sanitizer_common.h index 4c28659ed..d60112032 100644 --- a/lib/sanitizer_common/sanitizer_common.h +++ b/lib/sanitizer_common/sanitizer_common.h @@ -165,7 +165,7 @@ class InternalScopedBuffer { ~InternalScopedBuffer() { UnmapOrDie(ptr_, cnt_ * sizeof(T)); } T &operator[](uptr i) { return ptr_[i]; } T *data() { return ptr_; } - uptr size() { return cnt_ * sizeof(T); } + uptr size() { return cnt_; } private: T *ptr_; |