diff options
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h b/compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h index 32f0d3fff7a..c4649c2be9f 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h @@ -39,6 +39,10 @@ class RingBuffer { 2 * sizeof(T *)); } + static uptr SizeInBytes(uptr Size) { + return Size * sizeof(T) + 2 * sizeof(T*); + } + uptr SizeInBytes() { return SizeInBytes(size()); } void push(T t) { @@ -62,10 +66,6 @@ class RingBuffer { ~RingBuffer() {} RingBuffer(const RingBuffer&) = delete; - static uptr SizeInBytes(uptr Size) { - return Size * sizeof(T) + 2 * sizeof(T*); - } - // Data layout: // LNDDDDDDDD // D: data elements. |

