|
LLVM
4.0.0
|
#include "llvm/Support/MemoryBuffer.h"#include "llvm/ADT/SmallString.h"#include "llvm/Config/config.h"#include "llvm/Support/Errc.h"#include "llvm/Support/Errno.h"#include "llvm/Support/FileSystem.h"#include "llvm/Support/MathExtras.h"#include "llvm/Support/Path.h"#include "llvm/Support/Process.h"#include "llvm/Support/Program.h"#include <cassert>#include <cerrno>#include <cstring>#include <new>#include <sys/types.h>#include <system_error>#include <unistd.h>Go to the source code of this file.
Functions | |
| static void | CopyStringRef (char *Memory, StringRef Data) |
| CopyStringRef - Copies contents of a StringRef into a block of memory and null-terminates it. More... | |
| void * | operator new (size_t N, const NamedBufferAlloc &Alloc) |
| static ErrorOr < std::unique_ptr < MemoryBuffer > > | getFileAux (const Twine &Filename, int64_t FileSize, uint64_t MapSize, uint64_t Offset, bool RequiresNullTerminator, bool IsVolatileSize) |
| static ErrorOr < std::unique_ptr < MemoryBuffer > > | getMemoryBufferForStream (int FD, const Twine &BufferName) |
| static ErrorOr < std::unique_ptr < MemoryBuffer > > | getOpenFileImpl (int FD, const Twine &Filename, uint64_t FileSize, uint64_t MapSize, int64_t Offset, bool RequiresNullTerminator, bool IsVolatileSize) |
| static bool | shouldUseMmap (int FD, size_t FileSize, size_t MapSize, off_t Offset, bool RequiresNullTerminator, int PageSize, bool IsVolatileSize) |
|
static |
CopyStringRef - Copies contents of a StringRef into a block of memory and null-terminates it.
Definition at line 59 of file MemoryBuffer.cpp.
References llvm::StringRef::data(), llvm::StringRef::empty(), and llvm::StringRef::size().
Referenced by llvm::MemoryBuffer::getNewUninitMemBuffer(), and operator new().
|
static |
Definition at line 268 of file MemoryBuffer.cpp.
References getOpenFileImpl(), llvm::sys::fs::openFileForRead(), and llvm::MipsISD::Ret.
Referenced by llvm::MemoryBuffer::getFile(), and llvm::MemoryBuffer::getFileSlice().
|
static |
Definition at line 236 of file MemoryBuffer.cpp.
References llvm::SmallVectorTemplateCommon< T >::end(), llvm::MemoryBuffer::getMemBufferCopy(), llvm::support::endian::read(), llvm::SmallVectorImpl< char >::reserve(), llvm::SmallVectorImpl< char >::set_size(), and llvm::SmallVectorTemplateCommon< T >::size().
Referenced by llvm::MemoryBuffer::getFileAsStream(), getOpenFileImpl(), and llvm::MemoryBuffer::getSTDIN().
|
static |
Definition at line 339 of file MemoryBuffer.cpp.
References llvm::sys::fs::block_file, getMemoryBufferForStream(), llvm::MemoryBuffer::getNewUninitMemBuffer(), llvm::sys::Process::getPageSize(), llvm::make_error_code(), llvm::not_enough_memory, PageSize, llvm::support::endian::read(), llvm::sys::fs::regular_file, shouldUseMmap(), llvm::sys::fs::status(), and llvm::sys::fs::file_status::type().
Referenced by getFileAux(), llvm::MemoryBuffer::getOpenFile(), and llvm::MemoryBuffer::getOpenFileSlice().
| void* operator new | ( | size_t | N, |
| const NamedBufferAlloc & | Alloc | ||
| ) |
Definition at line 72 of file MemoryBuffer.cpp.
References CopyStringRef(), N, and llvm::StringRef::size().
|
static |
Definition at line 282 of file MemoryBuffer.cpp.
References assert(), llvm::WebAssembly::End, and llvm::sys::fs::status().
Referenced by getOpenFileImpl().
1.8.6