LLVM 20.0.0git
|
#include "llvm/Support/FileOutputBuffer.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Memory.h"
#include "llvm/Support/TimeProfiler.h"
#include <system_error>
#include <unistd.h>
Go to the source code of this file.
Functions | |
static Expected< std::unique_ptr< InMemoryBuffer > > | createInMemoryBuffer (StringRef Path, size_t Size, unsigned Mode) |
static Expected< std::unique_ptr< FileOutputBuffer > > | createOnDiskBuffer (StringRef Path, size_t Size, unsigned Mode) |
|
static |
Definition at line 118 of file FileOutputBuffer.cpp.
References llvm::sys::Memory::allocateMappedMemory(), llvm::errorCodeToError(), llvm::sys::Memory::MF_READ, llvm::sys::Memory::MF_WRITE, and Size.
Referenced by llvm::FileOutputBuffer::create(), and createOnDiskBuffer().
|
static |
Definition at line 128 of file FileOutputBuffer.cpp.
References llvm::consumeError(), llvm::sys::fs::convertFDToNativeFile(), llvm::sys::fs::TempFile::create(), createInMemoryBuffer(), llvm::errorCodeToError(), llvm::sys::fs::mapped_file_region::readwrite, llvm::sys::fs::resize_file_before_mapping_readwrite(), Size, and llvm::Expected< T >::takeError().
Referenced by llvm::FileOutputBuffer::create().