|
LLVM
4.0.0
|
This class represents a memory mapped file. More...
#include <FileSystem.h>
Public Types | |
| enum | mapmode { readonly, readwrite, priv } |
Public Member Functions | |
| mapped_file_region ()=delete | |
| mapped_file_region (mapped_file_region &)=delete | |
| mapped_file_region & | operator= (mapped_file_region &)=delete |
| mapped_file_region (int fd, mapmode mode, uint64_t length, uint64_t offset, std::error_code &ec) | |
| ~mapped_file_region () | |
| uint64_t | size () const |
| char * | data () const |
| const char * | const_data () const |
| Get a const view of the data. More... | |
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 685 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 687 of file FileSystem.h.
|
delete |
|
delete |
| llvm::sys::fs::mapped_file_region::mapped_file_region | ( | int | fd, |
| mapmode | mode, | ||
| uint64_t | length, | ||
| uint64_t | offset, | ||
| std::error_code & | ec | ||
| ) |
| fd | An open file descriptor to map. mapped_file_region takes ownership if closefd is true. It must have been opended in the correct mode. |
| llvm::sys::fs::mapped_file_region::~mapped_file_region | ( | ) |
|
static |
| const char* llvm::sys::fs::mapped_file_region::const_data | ( | ) | const |
Get a const view of the data.
Modifying this memory has undefined behavior.
| char* llvm::sys::fs::mapped_file_region::data | ( | ) | const |
Referenced by llvm::xray::loadTraceFile().
|
delete |
| uint64_t llvm::sys::fs::mapped_file_region::size | ( | ) | const |
Referenced by llvm::xray::loadTraceFile().
1.8.6