A mutable reference to consecutive elements in memory.
Synopsis
Declared in <llvm/ADT/ArrayRef.h>
template<typename T>
class [[nodiscard]] MutableArrayRef
: public ArrayRef<T>
Description
Represent a mutable reference to an array (0 or more elements consecutively in memory), i.e. a start pointer and a length. It allows various APIs to take and modify consecutive elements easily and conveniently.
This class does not own the underlying data, it is expected to be used in situations where the data resides in some other buffer, whose lifetime extends past that of the MutableArrayRef. For this reason, it is not in general safe to store a MutableArrayRef.
This is intended to be trivially copyable, so it should be passed by value.
Base Classes
Name |
Description |
A constant reference to consecutive elements in memory. |
Type Aliases
Name |
Description |
Const iterator over the referenced array elements. |
|
Pointer to a const element. |
|
Const reference to an element. |
|
Const reverse iterator over the referenced array elements. |
|
Signed type used to express the distance between iterators. |
|
Iterator over the referenced array elements. |
|
Mutable pointer to an element. |
|
Mutable reference to an element. |
|
Reverse iterator over the referenced array elements. |
|
Unsigned type used to express the size of the array. |
|
Element type stored in the referenced array. |
Member Functions
Name |
Description |
|
Constructors |
Disallow accidental assignment from a temporary. |
|
Get the last element. |
|
Iterator to the first mutable element. |
|
Returns the last element and drops it from ArrayRef. |
|
Returns the first element and drops it from ArrayRef. |
|
Allocate a mutable copy in |
|
Return a mutable pointer to the start of the array. |
|
Drop the last |
|
Drop the first |
|
Return a copy of *this with the first N elements not satisfying the given predicate removed. |
|
Return a copy of *this with the first N elements satisfying the given predicate removed. |
|
Check if the array is empty. |
|
Iterator one past the last mutable element. |
|
Check for element‐wise equality. |
|
Get the first element. |
|
Return a mutable reference to the element at |
|
Return a reverse iterator to the last mutable element. |
|
Return a reverse iterator to the element before the first element. |
|
Get the array size. |
|
|
|
Return a copy of *this with only the last |
|
Return a copy of *this with only the first |
|
Return the first N elements of this Array that don't satisfy the given predicate. |
|
Return the first N elements of this Array that satisfy the given predicate. |
|
Copy the referenced elements into a new std::vector. |
|
Convert this ArrayRef into a std::vector copy of its elements. |
Deduction Guides
Name |
Description |
@{ Deduction guide to construct a |
|
Deduction guide to construct a |
|
Deduction guide to construct a |
|
Deduction guide to construct a |
|
Deduction guide to construct a |
|
Deduction guide to construct a |
|
Deduction guide to construct a |
Non-Member Functions
Name |
Description |
Compute a layout for a struct containing the given fields, making a best‐effort attempt to minimize the amount of space required. |
|
Build an array serialization helper whose length comes from |
|
Build a helper that deserializes the remaining stream as an array of |
|
Returns the BitcodeModule that is ThinLTO. |
|
Write a MachO structure into a buffer at the given offset. |
|
Store each target's |
|
Store each target's |
Return Value
|
Note
|
The return value should not be discarded. |
Created with MrDocs