26#include "wpi/util/SmallVector.hpp"
27#include "wpi/util/raw_ostream.hpp"
40 : m_sv(
std::move(sv)), m_bufferName(
"<in-memory object>") {
41 Init(this->m_sv.begin(), this->m_sv.end());
47 : m_sv(
std::move(sv)), m_bufferName(
name) {
48 Init(this->m_sv.begin(), this->m_sv.end());
59 SmallVector<uint8_t, 0> m_sv;
60 std::string m_bufferName;
@ name
Definition base.h:690
BufferKind
The kind of memory backing used to support the MemoryBuffer.
Definition MemoryBuffer.hpp:125
@ MemoryBuffer_Malloc
Definition MemoryBuffer.hpp:125
void Init(const uint8_t *bufStart, const uint8_t *bufEnd)
Definition BooleanTopic.hpp:24
BufferKind GetBufferKind() const override
Return information on the memory mechanism used to support the MemoryBuffer.
Definition SmallVectorMemoryBuffer.hpp:56
std::string_view GetBufferIdentifier() const override
Return an identifier for this buffer, typically the filename it was read from.
Definition SmallVectorMemoryBuffer.hpp:54
SmallVectorMemoryBuffer(SmallVectorImpl< uint8_t > &&sv)
Construct an SmallVectorMemoryBuffer from the given SmallVector r-value.
Definition SmallVectorMemoryBuffer.hpp:39
SmallVectorMemoryBuffer(SmallVectorImpl< uint8_t > &&sv, std::string_view name)
Construct a named SmallVectorMemoryBuffer from the given SmallVector r-value and StringRef.
Definition SmallVectorMemoryBuffer.hpp:46
~SmallVectorMemoryBuffer() override
Definition StringMap.hpp:773
Definition raw_os_ostream.hpp:19