14#ifndef LLVM_SUPPORT_SMALLVECTORMEMORYBUFFER_H
15#define LLVM_SUPPORT_SMALLVECTORMEMORYBUFFER_H
33 bool RequiresNullTerminator =
true)
35 RequiresNullTerminator) {}
40 bool RequiresNullTerminator =
true)
42 if (RequiresNullTerminator) {
46 init(this->SV.
begin(), this->SV.end(),
false);
58 std::string BufferName;
This file defines the SmallVector class.
This interface provides simple read-only access to a block of memory, and provides simple methods for...
BufferKind
The kind of memory backing used to support the MemoryBuffer.
void init(const char *BufStart, const char *BufEnd, bool RequiresNullTerminator)
init - Initialize this MemoryBuffer as a reference to externally allocated memory,...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
SmallVector-backed MemoryBuffer instance.
SmallVectorMemoryBuffer(SmallVectorImpl< char > &&SV, bool RequiresNullTerminator=true)
Construct a SmallVectorMemoryBuffer from the given SmallVector r-value.
StringRef getBufferIdentifier() const override
Return an identifier for this buffer, typically the filename it was read from.
SmallVectorMemoryBuffer(SmallVectorImpl< char > &&SV, StringRef Name, bool RequiresNullTerminator=true)
Construct a named SmallVectorMemoryBuffer from the given SmallVector r-value and StringRef.
BufferKind getBufferKind() const override
Return information on the memory mechanism used to support the MemoryBuffer.
~SmallVectorMemoryBuffer() override
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.