15 #ifndef LLVM_EXECUTIONENGINE_OBJECTBUFFER_H
16 #define LLVM_EXECUTIONENGINE_OBJECTBUFFER_H
24 class ObjectMemoryBuffer :
public MemoryBuffer {
28 : SV(SV), BufferName(
"<in-memory object>") {
34 : SV(SV), BufferName(Name) {
43 std::string BufferName;
void init(const char *BufStart, const char *BufEnd, bool RequiresNullTerminator)
init - Initialize this MemoryBuffer as a reference to externally allocated memory, memory that we know is already null terminated.
const char * getBufferIdentifier() const override
Return an identifier for this buffer, typically the filename it was read from.
ObjectMemoryBuffer(SmallVector< char, N > SV, StringRef Name)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
ObjectMemoryBuffer(SmallVector< char, N > SV)
BufferKind
The kind of memory backing used to support the MemoryBuffer.
StringRef - Represent a constant reference to a string, i.e.
BufferKind getBufferKind() const override
Return information on the memory mechanism used to support the MemoryBuffer.