class mapped_file_region

Declaration

class mapped_file_region { /* full declaration omitted */ };

Description

This class represents a memory mapped file. It is based on boost::iostreams::mapped_file.

Declared at: llvm/include/llvm/Support/FileSystem.h:1269

Member Variables

private size_t Size = 0
Platform-specific mapping state.
private void* Mapping = nullptr
private llvm::sys::fs::mapped_file_region::mapmode Mode = readonly

Method Overview

Methods

static int alignment()

Declared at: llvm/include/llvm/Support/FileSystem.h:1341

Returns

The minimum alignment offset must be.

const char* const_data() const

Description

Get a const view of the data. Modifying this memory has undefined behavior.

Declared at: llvm/include/llvm/Support/FileSystem.h:1338

void copyFrom(
    const llvm::sys::fs::mapped_file_region&
        Copied)

Declared at: llvm/include/llvm/Support/FileSystem.h:1286

Parameters

const llvm::sys::fs::mapped_file_region& Copied

char* data() const

Declared at: llvm/include/llvm/Support/FileSystem.h:1334

void dontNeed()

Declared at: llvm/include/llvm/Support/FileSystem.h:1331

void dontNeedImpl()

Declared at: llvm/include/llvm/Support/FileSystem.h:1301

std::error_code init(
    sys::fs::file_t FD,
    uint64_t Offset,
    llvm::sys::fs::mapped_file_region::mapmode
        Mode)

Declared at: llvm/include/llvm/Support/FileSystem.h:1303

Parameters

sys::fs::file_t FD
uint64_t Offset
llvm::sys::fs::mapped_file_region::mapmode Mode

mapped_file_region(
    sys::fs::file_t fd,
    llvm::sys::fs::mapped_file_region::mapmode
        mode,
    size_t length,
    uint64_t offset,
    std::error_code& ec)

Declared at: llvm/include/llvm/Support/FileSystem.h:1318

Parameters

sys::fs::file_t fd
An open file descriptor to map. Does not take ownership of fd.
llvm::sys::fs::mapped_file_region::mapmode mode
size_t length
uint64_t offset
std::error_code& ec

mapped_file_region(
    const llvm::sys::fs::mapped_file_region&)

Declared at: llvm/include/llvm/Support/FileSystem.h:1314

Parameters

const llvm::sys::fs::mapped_file_region&

mapped_file_region(
    llvm::sys::fs::mapped_file_region&& Moved)

Declared at: llvm/include/llvm/Support/FileSystem.h:1307

Parameters

llvm::sys::fs::mapped_file_region&& Moved

mapped_file_region()

Declared at: llvm/include/llvm/Support/FileSystem.h:1306

void moveFromImpl(
    llvm::sys::fs::mapped_file_region& Moved)

Declared at: llvm/include/llvm/Support/FileSystem.h:1295

Parameters

llvm::sys::fs::mapped_file_region& Moved

bool operator bool() const

Description

Check if this is a valid mapping.

Declared at: llvm/include/llvm/Support/FileSystem.h:1324

size_t size() const

Declared at: llvm/include/llvm/Support/FileSystem.h:1333

void unmap()

Description

Unmap.

Declared at: llvm/include/llvm/Support/FileSystem.h:1327

void unmapImpl()

Declared at: llvm/include/llvm/Support/FileSystem.h:1300

~mapped_file_region()

Declared at: llvm/include/llvm/Support/FileSystem.h:1321