Constructors

Synopses

Declared in <llvm/Support/FileSystem.h>

Construct an unmapped region.

constexpr
mapped_file_region() = default;

Copying a mapped region is not allowed.

mapped_file_region(mapped_file_region const& Copied) = delete;

Move‐construct, taking ownership of Moved's mapping.

Map a region of an open file into memory.

mapped_file_region(
    sys::fs::file_t fd,
    mapmode mode,
    size_t length,
    uint64_t offset,
    std::error_code& ec,
    char const* name = nullptr);

Parameters

Name

Description

Copied

Unused; copy construction is deleted.

Moved

Region whose mapping is taken over.

fd

An open file descriptor to map. Does not take ownership of fd.

mode

Access mode for the mapped region.

length

Number of bytes to map.

offset

Byte offset into the file at which mapping begins.

ec

Set to the status of creating the mapping.

name

Optional name associated with the mapping (platform‐specific).

Created with MrDocs