LLVM 20.0.0git
|
This class represents a memory mapped file. More...
#include "llvm/Support/FileSystem.h"
Public Types | |
enum | mapmode { readonly , readwrite , priv } |
Public Member Functions | |
mapped_file_region ()=default | |
mapped_file_region (mapped_file_region &&Moved) | |
mapped_file_region & | operator= (mapped_file_region &&Moved) |
mapped_file_region (const mapped_file_region &)=delete | |
mapped_file_region & | operator= (const mapped_file_region &)=delete |
mapped_file_region (sys::fs::file_t fd, mapmode mode, size_t length, uint64_t offset, std::error_code &ec) | |
~mapped_file_region () | |
operator bool () const | |
Check if this is a valid mapping. | |
void | unmap () |
Unmap. | |
void | dontNeed () |
size_t | size () const |
char * | data () const |
const char * | const_data () const |
Get a const view of the data. | |
Static Public Member Functions | |
static int | alignment () |
This class represents a memory mapped file.
It is based on boost::iostreams::mapped_file.
Definition at line 1266 of file FileSystem.h.
Enumerator | |
---|---|
readonly | May only access map via const_data as read only. |
readwrite | May access map via data and modify it. Written to path. |
priv | May modify via data, but changes are lost on destruction. |
Definition at line 1268 of file FileSystem.h.
|
default |
Referenced by unmap().
|
inline |
Definition at line 1304 of file FileSystem.h.
|
delete |
llvm::sys::fs::mapped_file_region::mapped_file_region | ( | sys::fs::file_t | fd, |
mapmode | mode, | ||
size_t | length, | ||
uint64_t | offset, | ||
std::error_code & | ec | ||
) |
fd | An open file descriptor to map. Does not take ownership of fd. |
|
inline |
Definition at line 1318 of file FileSystem.h.
|
static |
char * llvm::sys::fs::mapped_file_region::data | ( | ) | const |
Definition at line 1164 of file Path.cpp.
References assert().
Referenced by llvm::xray::loadProfile(), llvm::xray::loadTraceFile(), and loadYAML().
|
inline |
Definition at line 1328 of file FileSystem.h.
|
inlineexplicit |
Check if this is a valid mapping.
Definition at line 1321 of file FileSystem.h.
|
delete |
|
inline |
Definition at line 1305 of file FileSystem.h.
References unmap().
size_t llvm::sys::fs::mapped_file_region::size | ( | ) | const |
Definition at line 1159 of file Path.cpp.
References assert().
Referenced by llvm::xray::loadProfile(), llvm::xray::loadTraceFile(), and loadYAML().
|
inline |
Unmap.
Definition at line 1324 of file FileSystem.h.
References mapped_file_region().
Referenced by operator=().