Shared SmallVector API and growth logic independent of inline capacity.
Declared in <llvm/ADT/SmallVector.h>
template<typename T>
class SmallVectorImpl
: public SmallVectorTemplateBase<T>
This class consists of common code factored out of the SmallVector class to reduce code duplication based on the SmallVector 'N' template parameter.
| Name | Description |
|---|---|
SmallVectorTemplateBase<T> | SmallVectorTemplateBase<TriviallyCopyable = false> - This is where we put method implementations that are designed to work with non-trivial T's. |
| Name | Description |
|---|---|
const_iterator | Const iterator over the vector elements. |
const_pointer | Const pointer to an element. |
const_reference | Const reference to an element. |
const_reverse_iterator | Const reverse iterator over the vector elements. |
difference_type | Signed type used to express the distance between iterators. |
iterator | Mutable iterator over the vector elements. |
pointer | Mutable pointer to an element. |
reference | Mutable reference to an element. |
reverse_iterator | Reverse iterator over the vector elements. |
size_type | Unsigned type used to express the size of the vector. |
value_type | Element type stored in the vector. |
| Name | Description |
|---|---|
SmallVectorImpl [constructor] [deleted] | Copy construction is not allowed. |
operator= | Assignment operators |
append | append overloads |
assign | assign overloads |
back | back overloads |
begin | Return an iterator to the first element. |
capacity | Return the number of elements the vector can hold without reallocating. |
capacity_in_bytes | Return the number of bytes of allocated storage. |
clear | Remove all elements from the vector. |
data | Return a pointer to the vector's buffer, even if empty(). |
emplace_back | Construct an element in place at the end using Args. |
empty | Return true if the vector contains no elements. |
end | Return an iterator past the last element. |
erase | erase overloads |
front | front overloads |
insert | insert overloads |
max_size | Return the maximum number of elements the vector can hold. |
operator[] | Subscript operators |
pop_back | Destroy and remove the last element of the vector. |
pop_back_n | Remove the last NumItems elements from the vector. |
pop_back_val | Remove and return the last element by move. |
push_back | push_back overloads |
rbegin | rbegin overloads |
rend | rend overloads |
reserve | Ensure capacity for at least N elements. |
resize | resize overloads |
resize_for_overwrite | Like resize, but new elements are default-initialized without value construction when T is POD-like. |
size | Return the number of elements in the vector. |
size_in_bytes | Return the number of bytes used by the current elements. |
swap | Exchange the contents of this vector with RHS. |
truncate | Like resize, but requires that N is less than size(). |
operator== | Return true if this vector and RHS have equal elements. |
operator!= | Return true if this vector and RHS differ. |
operator< | Lexicographically compare this vector with RHS. |
operator<= | Lexicographically compare this vector with RHS for less-or-equal. |
operator> | Lexicographically compare this vector with RHS for greater-than. |
operator>= | Lexicographically compare this vector with RHS for greater-or-equal. |
| Name | Description |
|---|---|
capacity | Inherit capacity() from SmallVectorBase. |
empty | Inherit empty() from SmallVectorBase. |
size | Inherit size() from SmallVectorBase. |
| Name | Description |
|---|---|
ValueParamT | Parameter type used when passing elements to mutating operations. |
| Name | Description |
|---|---|
SmallVectorImpl [constructor] | Construct an empty SmallVectorImpl with inline capacity N. |
~SmallVectorImpl [destructor] | Destroy storage if the vector grew beyond the inline buffer. |
assertSafeToAdd | Check whether Elt will be invalidated by increasing the size of the vector by N. |
assertSafeToAddRange | Check whether any part of the range will be invalidated by growing. |
assertSafeToReferenceAfterClear | Check whether any part of the range will be invalidated by clearing. |
assertSafeToReferenceAfterResize | Check whether Elt will be invalidated by resizing the vector to NewSize. |
assignRemote | Take ownership of RHS's heap allocation, leaving RHS empty and small. |
getFirstEl | Return a pointer to the first element of inline storage. |
grow | Grow the allocated memory without initializing new elements. |
growAndAssign | Grow storage and replace contents with NumElts copies of Elt. |
growAndEmplaceBack | Grow storage and emplace an element at the end using Args. |
grow_pod | grow_pod overloads |
isRangeInStorage | Return true if First and Last form a valid (possibly empty) range in this vector's storage. |
isReferenceToRange | Return true if V is an internal reference to the given range. |
isReferenceToStorage | Return true if V is an internal reference to this vector. |
isSafeToReferenceAfterResize | Return true unless Elt will be invalidated by resizing the vector to NewSize. |
isSmall | Return true if this is a smallvector which has not had dynamic memory allocated for it. |
mallocForGrow | mallocForGrow overloads |
moveElementsForGrow | Move existing elements over to the new allocation NewElts, the middle section of grow(). |
reserveForParamAndGetAddress | Reserve enough space to add one element, and return the updated element pointer in case it was a reference to the storage. |
resetToSmall | Put this vector in a state of being small. |
set_allocation_range | Set the array data pointer to Begin and capacity to N. |
set_size | Set the array size to N, which the current array must have enough capacity for. |
takeAllocationForGrow | Transfer ownership of the allocation, finishing up grow(). |
| Name | Description |
|---|---|
SizeTypeMax | The maximum value of the Size_T used. |
destroy_range | Destroy the elements in the range []S, E). |
forward_value_param | forward_value_param overloads |
reserveForParamAndGetAddressImpl | Reserve enough space to add one element, and return the updated element pointer in case it was a reference to the storage. |
uninitialized_copy | Copy the range []I, E) onto uninitialized memory starting at Dest. |
uninitialized_move | Move the range []I, E) into uninitialized memory starting at Dest. |
| Name | Description |
|---|---|
BeginX | Pointer to the first element, or inline storage. |
Capacity | Number of elements the current storage can hold without reallocating. |
Size | Number of constructed elements currently stored. |
| Name | Description |
|---|---|
TakesParamByValue | False when elements are passed by const reference rather than by value. |
| Name | Description |
|---|---|
TakesParamByValue | Whether element parameters are passed by value rather than by const reference. |
| Name | Description |
|---|---|
ComputeASanStackFrameDescription | Compute a frame description string for AddressSanitizer reports. |
ComputeASanStackFrameLayout | Compute the AddressSanitizer layout of a stack frame. |
GetShadowBytes | Return shadow bytes for a stack frame with all locals in scope. |
GetShadowBytesAfterScope | Return shadow bytes after all locals have gone out of scope. |
RecursivelyDeleteTriviallyDeadInstructions | Recursively delete a worklist of trivially dead instructions. |
RecursivelyDeleteTriviallyDeadInstructionsPermissive | Recursively delete trivially dead instructions from a permissive worklist. |
appendLEB128 | Append a LEB128-encoded value to a byte buffer. |
filterDeadComdatFunctions | Filter out potentially dead comdat functions where other entries keep the entire comdat group alive. |
findDevirtualizableCallsForTypeCheckedLoad | Given a call to the intrinsic @llvm.type.checked.load, find all devirtualizable call sites based on the call and return them in DevirtCalls. |
findDevirtualizableCallsForTypeTest | Given a call to the intrinsic @llvm.type.test, find all devirtualizable call sites based on the call and return them in DevirtCalls. |
formLCSSAForInstructions | Ensures LCSSA form for every instruction from the Worklist in the scope of innermost containing loop. |
get_thread_name | Get the name of the current thread. |
isManyPotentiallyReachableFromMany | Determine whether any block in Worklist can reach any block in StopSet. |
isPotentiallyReachableFromMany | Determine whether any block in Worklist can reach StopBB. |
operator!= | Return true if SmallVector LHS differs from ArrayRef RHS. |
operator== | Return true if SmallVector LHS equals ArrayRef RHS. |
AArch64::fillValidCPUArchList | Append all valid CPU and architecture names to Values. |
AMDGPU::fillValidArchListAMDGCN | Append the valid AMDGCN GPU names to Values. |
AMDGPU::fillValidArchListR600 | Append the valid R600 GPU names to Values. |
ARM::fillValidCPUArchList | Append every valid ARM CPU name to Values. |
CSKY::fillValidCPUArchList | Append every valid CSKY CPU name to Values. |
LoongArch::fillValidCPUList | Append every valid LoongArch CPU name to Values. |
MachO::replace_extension | Replace extension considering frameworks. |
PPC::fillValidCPUList | Append every valid PowerPC CPU name to Values. |
PPC::fillValidTuneCPUList | Append every valid PowerPC tune CPU name to Values. |
RISCV::fillValidCPUArchList | Append every valid RISC-V CPU name for the given bitness to Values. |
RISCV::fillValidTuneCPUArchList | Append every valid RISC-V tune CPU name for the given bitness to Values. |
RISCV::getAllTuneFeatures | Append every recognized RISC-V tune-feature name to TuneFeatures. |
SwitchCG::getJumpTableNumCases | Return the number of cases within a range. |
X86::fillValidCPUArchList | Provide a list of valid CPU names. If Only64Bit is true, the list will only contain 64-bit capable CPUs. |
X86::fillValidTuneCPUList | Provide a list of valid -mtune names. |
Xtensa::fillValidCPUList | Append every valid Xtensa CPU name (and aliases) to Values. |
omp::getBestVariantMatchForContext | Return the index (into VMIs) of the variant with the highest score from the ones applicable in Ctx. See llvm::isVariantApplicableInContext. |
yaml::yaml2ObjectFile | Convenience function for tests. |
support::endian::write | Append V to Out using the given byte order. |
sys::fs::current_path | Get the current path. |
sys::fs::make_absolute | Make path an absolute path. |
sys::path::append | Append path components using path style separators. |
sys::path::append | Append to path. |
sys::path::append | Append to path. |
sys::path::cache_directory | Get the directory where installed packages should put their machine-local cache, e.g. $XDG_CACHE_HOME. |
sys::path::home_directory | Get the user's home directory. |
sys::path::make_preferred | For Windows path styles, convert path to use the preferred path separators. For other styles, do nothing. |
sys::path::native | Convert path to the native form in place. |
sys::path::remove_dots | Remove './' and optionally '../' components, and canonicalize separators. |
sys::path::remove_filename | Remove the last component from path unless it is the root dir. |
sys::path::replace_extension | Replace the file extension of path with extension. |
sys::path::replace_path_prefix | Replace matching path prefix with another path. |
sys::path::user_config_directory | Get the directory where packages should read user-specific configurations. e.g. $XDG_CONFIG_HOME. |
| Name | Description |
|---|---|
SmallVector | Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference sizeof(SmallVector<T, 0>). |
| Name | Description |
|---|---|
| T | Element type stored in the vector. |