BumpVector.h (198398) | BumpVector.h (200583) |
---|---|
1//===-- BumpVector.h - Vector-like ADT that uses bump allocation --*- C++ -*-=// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 152 unchanged lines hidden (view full) --- 161 162 /// capacity - Return the total number of elements in the currently allocated 163 /// buffer. 164 size_t capacity() const { return Capacity - Begin; } 165 166private: 167 /// grow - double the size of the allocated memory, guaranteeing space for at 168 /// least one more element or MinSize if specified. | 1//===-- BumpVector.h - Vector-like ADT that uses bump allocation --*- C++ -*-=// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 152 unchanged lines hidden (view full) --- 161 162 /// capacity - Return the total number of elements in the currently allocated 163 /// buffer. 164 size_t capacity() const { return Capacity - Begin; } 165 166private: 167 /// grow - double the size of the allocated memory, guaranteeing space for at 168 /// least one more element or MinSize if specified. |
169 void grow(BumpVectorContext &C, size_type MinSize = 0); | 169 void grow(BumpVectorContext &C, size_type MinSize = 1); |
170 171 void construct_range(T *S, T *E, const T &Elt) { 172 for (; S != E; ++S) 173 new (S) T(Elt); 174 } 175 176 void destroy_range(T *S, T *E) { 177 while (S != E) { --- 38 unchanged lines hidden --- | 170 171 void construct_range(T *S, T *E, const T &Elt) { 172 for (; S != E; ++S) 173 new (S) T(Elt); 174 } 175 176 void destroy_range(T *S, T *E) { 177 while (S != E) { --- 38 unchanged lines hidden --- |