11#include "llvm/Support/MemoryBuffer.h"
18 : Buffer(std::move(MemBuffer)) {
19 assert(
Buffer !=
nullptr &&
20 "Cannot construct a DataBufferLLVM with a null buffer");
26 return reinterpret_cast<const uint8_t *
>(
Buffer->getBufferStart());
30 return Buffer->getBufferSize();
34 std::unique_ptr<llvm::WritableMemoryBuffer> MemBuffer)
35 : Buffer(std::move(MemBuffer)) {
36 assert(
Buffer !=
nullptr &&
37 "Cannot construct a WritableDataBufferLLVM with a null buffer");
43 return reinterpret_cast<const uint8_t *
>(
Buffer->getBufferStart());
47 return Buffer->getBufferSize();
lldb::offset_t GetByteSize() const override
Get the number of bytes in the data buffer.
~DataBufferLLVM() override
DataBufferLLVM(std::unique_ptr< llvm::MemoryBuffer > Buffer)
}
std::unique_ptr< llvm::MemoryBuffer > Buffer
static char ID
LLVM RTTI support.
const uint8_t * GetBytesImpl() const override
}
~WritableDataBufferLLVM() override
const uint8_t * GetBytesImpl() const override
}
lldb::offset_t GetByteSize() const override
Get the number of bytes in the data buffer.
WritableDataBufferLLVM(std::unique_ptr< llvm::WritableMemoryBuffer > Buffer)
}
static char ID
LLVM RTTI support.
std::unique_ptr< llvm::WritableMemoryBuffer > Buffer
A class that represents a running process on the host machine.