class SmallVectorMemoryBuffer

Declaration

class SmallVectorMemoryBuffer : public MemoryBuffer { /* full declaration omitted */ };

Description

SmallVector-backed MemoryBuffer instance. This class enables efficient construction of MemoryBuffers from SmallVector instances. This is useful for MCJIT and Orc, where object files are streamed into SmallVectors, then inspected using ObjectFile (which takes a MemoryBuffer).

Declared at: llvm/include/llvm/Support/SmallVectorMemoryBuffer.h:29

Inherits from: MemoryBuffer

Member Variables

Inherited from MemoryBuffer:

protected static Mapmode = sys::fs::mapped_file_region::readonly

Method Overview

Inherited from MemoryBuffer:

Methods

SmallVectorMemoryBuffer(
    SmallVectorImpl<char>&& SV)

Description

Construct an SmallVectorMemoryBuffer from the given SmallVector r-value. FIXME: It'd be nice for this to be a non-templated constructor taking a SmallVectorImpl here instead of a templated one taking a SmallVector <N >, but SmallVector's move-construction/assignment currently only take SmallVectors. If/when that is fixed we can simplify this constructor and the following one.

Declared at: llvm/include/llvm/Support/SmallVectorMemoryBuffer.h:39

Parameters

SmallVectorImpl<char>&& SV

SmallVectorMemoryBuffer(
    SmallVectorImpl<char>&& SV,
    llvm::StringRef Name)

Description

Construct a named SmallVectorMemoryBuffer from the given SmallVector r-value and StringRef.

Declared at: llvm/include/llvm/Support/SmallVectorMemoryBuffer.h:46

Parameters

SmallVectorImpl<char>&& SV
llvm::StringRef Name

llvm::StringRef getBufferIdentifier() const

Description

Return an identifier for this buffer, typically the filename it was read from.

Declared at: llvm/include/llvm/Support/SmallVectorMemoryBuffer.h:54

llvm::MemoryBuffer::BufferKind getBufferKind()
    const

Description

Return information on the memory mechanism used to support the MemoryBuffer.

Declared at: llvm/include/llvm/Support/SmallVectorMemoryBuffer.h:56

~SmallVectorMemoryBuffer()

Declared at: llvm/include/llvm/Support/SmallVectorMemoryBuffer.h:52