llvm::CHERICapabilityFormatBase

CRTP base for CHERI capability format helpers.

Synopsis

Declared in <llvm/Support/CHERICapabilityFormat.h>

template<
    typename Derived,
    typename AddressType>
struct CHERICapabilityFormatBase;

Description

Provides static utilities for alignment masks, required alignments, and representable lengths for a concrete capability encoding.

Member Functions

NameDescription
CHERICapabilityFormatBase [constructor] [deleted]Deleted; this type exposes only static members.

Static Member Functions

NameDescription
getAlignmentMask Returns the alignment mask for an allocation of size Length.
getRepresentableLength Returns Length rounded up to the nearest representable allocation length.
getRequiredAlignment Returns the required alignment for an allocation of size Length.

Static Data Members

NameDescription
AddressMask Bitmask with all bits of AddressType set.

Derived Classes

NameDescription
CHERIoTCapabilityFormat CHERIoT compressed capability format helpers.
RVYCapabilityFormat RISC-V Y (CHERI) compressed capability format.

Template Parameters

NameDescription
DerivedConcrete format that implements getAlignmentMaskImpl.
AddressTypeUnsigned integer type for addresses and lengths.