|
LLVM
3.7.0
|
SmallVector-backed MemoryBuffer instance. More...
#include <ObjectMemoryBuffer.h>
Public Member Functions | |
| ObjectMemoryBuffer (SmallVectorImpl< char > &&SV) | |
| Construct an ObjectMemoryBuffer from the given SmallVector r-value. More... | |
| ObjectMemoryBuffer (SmallVectorImpl< char > &&SV, StringRef Name) | |
| Construct a named ObjectMemoryBuffer from the given SmallVector r-value and StringRef. More... | |
| const char * | getBufferIdentifier () const override |
| Return an identifier for this buffer, typically the filename it was read from. More... | |
| BufferKind | getBufferKind () const override |
| Return information on the memory mechanism used to support the MemoryBuffer. More... | |
| template<unsigned N> | |
| ObjectMemoryBuffer (SmallVector< char, N > SV) | |
| template<unsigned N> | |
| ObjectMemoryBuffer (SmallVector< char, N > SV, StringRef Name) | |
| const char * | getBufferIdentifier () const override |
| Return an identifier for this buffer, typically the filename it was read from. More... | |
| BufferKind | getBufferKind () const override |
| Return information on the memory mechanism used to support the MemoryBuffer. More... | |
Public Member Functions inherited from llvm::MemoryBuffer | |
| virtual | ~MemoryBuffer () |
| const char * | getBufferStart () const |
| const char * | getBufferEnd () const |
| size_t | getBufferSize () const |
| StringRef | getBuffer () const |
| MemoryBufferRef | getMemBufferRef () const |
Additional Inherited Members | |
Public Types inherited from llvm::MemoryBuffer | |
| enum | BufferKind { MemoryBuffer_Malloc, MemoryBuffer_MMap } |
| The kind of memory backing used to support the MemoryBuffer. More... | |
Static Public Member Functions inherited from llvm::MemoryBuffer | |
| static ErrorOr < std::unique_ptr < MemoryBuffer > > | getFile (const Twine &Filename, int64_t FileSize=-1, bool RequiresNullTerminator=true, bool IsVolatileSize=false) |
| Open the specified file as a MemoryBuffer, returning a new MemoryBuffer if successful, otherwise returning null. More... | |
| static ErrorOr < std::unique_ptr < MemoryBuffer > > | getOpenFileSlice (int FD, const Twine &Filename, uint64_t MapSize, int64_t Offset) |
| Given an already-open file descriptor, map some slice of it into a MemoryBuffer. More... | |
| static ErrorOr < std::unique_ptr < MemoryBuffer > > | getOpenFile (int FD, const Twine &Filename, uint64_t FileSize, bool RequiresNullTerminator=true, bool IsVolatileSize=false) |
| Given an already-open file descriptor, read the file and return a MemoryBuffer. More... | |
| static std::unique_ptr < MemoryBuffer > | getMemBuffer (StringRef InputData, StringRef BufferName="", bool RequiresNullTerminator=true) |
| Open the specified memory range as a MemoryBuffer. More... | |
| static std::unique_ptr < MemoryBuffer > | getMemBuffer (MemoryBufferRef Ref, bool RequiresNullTerminator=true) |
| static std::unique_ptr < MemoryBuffer > | getMemBufferCopy (StringRef InputData, const Twine &BufferName="") |
| Open the specified memory range as a MemoryBuffer, copying the contents and taking ownership of it. More... | |
| static std::unique_ptr < MemoryBuffer > | getNewMemBuffer (size_t Size, StringRef BufferName="") |
| Allocate a new zero-initialized MemoryBuffer of the specified size. More... | |
| static std::unique_ptr < MemoryBuffer > | getNewUninitMemBuffer (size_t Size, const Twine &BufferName="") |
| Allocate a new MemoryBuffer of the specified size that is not initialized. More... | |
| static ErrorOr < std::unique_ptr < MemoryBuffer > > | getSTDIN () |
| Read all of stdin into a file buffer, and return it. More... | |
| static ErrorOr < std::unique_ptr < MemoryBuffer > > | getFileOrSTDIN (const Twine &Filename, int64_t FileSize=-1) |
| Open the specified file as a MemoryBuffer, or open stdin if the Filename is "-". More... | |
| static ErrorOr < std::unique_ptr < MemoryBuffer > > | getFileSlice (const Twine &Filename, uint64_t MapSize, uint64_t Offset) |
| Map a subrange of the specified file as a MemoryBuffer. More... | |
Protected Member Functions inherited from llvm::MemoryBuffer | |
| MemoryBuffer () | |
| 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. More... | |
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).
Definition at line 30 of file ObjectMemoryBuffer.h.
|
inline |
Construct an ObjectMemoryBuffer 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.
Definition at line 40 of file ObjectMemoryBuffer.h.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), and llvm::MemoryBuffer::init().
|
inline |
Construct a named ObjectMemoryBuffer from the given SmallVector r-value and StringRef.
Definition at line 47 of file ObjectMemoryBuffer.h.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), and llvm::MemoryBuffer::init().
|
inline |
Definition at line 27 of file ObjectBuffer.h.
References llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorTemplateCommon< T >::end(), and llvm::MemoryBuffer::init().
|
inline |
Definition at line 33 of file ObjectBuffer.h.
References llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorTemplateCommon< T >::end(), and llvm::MemoryBuffer::init().
|
inlineoverridevirtual |
Return an identifier for this buffer, typically the filename it was read from.
Reimplemented from llvm::MemoryBuffer.
Definition at line 37 of file ObjectBuffer.h.
|
inlineoverridevirtual |
Return an identifier for this buffer, typically the filename it was read from.
Reimplemented from llvm::MemoryBuffer.
Definition at line 52 of file ObjectMemoryBuffer.h.
|
inlineoverridevirtual |
Return information on the memory mechanism used to support the MemoryBuffer.
Implements llvm::MemoryBuffer.
Definition at line 39 of file ObjectBuffer.h.
References llvm::MemoryBuffer::MemoryBuffer_Malloc.
|
inlineoverridevirtual |
Return information on the memory mechanism used to support the MemoryBuffer.
Implements llvm::MemoryBuffer.
Definition at line 54 of file ObjectMemoryBuffer.h.
References llvm::MemoryBuffer::MemoryBuffer_Malloc.
1.8.6