LLVM 23.0.0git
llvm::CHERICapabilityFormatBase< Derived, AddressType > Struct Template Reference

#include "llvm/Support/CHERICapabilityFormat.h"

Inheritance diagram for llvm::CHERICapabilityFormatBase< Derived, AddressType >:
[legend]

Public Member Functions

 CHERICapabilityFormatBase ()=delete

Static Public Member Functions

static AddressType getAlignmentMask (AddressType Length)
 Returns the "alignment mask" for an allocation of size Length.
static Align getRequiredAlignment (AddressType Length)
 Returns the required alignment for an allocation of size Length.
static AddressType getRepresentableLength (AddressType Length)
 Returns Length rounded up to the nearest representable allocation length.

Static Public Attributes

static constexpr AddressType AddressMask = ~static_cast<AddressType>(0)

Detailed Description

template<typename Derived, typename AddressType>
struct llvm::CHERICapabilityFormatBase< Derived, AddressType >

Definition at line 18 of file CHERICapabilityFormat.h.

Constructor & Destructor Documentation

◆ CHERICapabilityFormatBase()

template<typename Derived, typename AddressType>
llvm::CHERICapabilityFormatBase< Derived, AddressType >::CHERICapabilityFormatBase ( )
delete

Member Function Documentation

◆ getAlignmentMask()

template<typename Derived, typename AddressType>
AddressType llvm::CHERICapabilityFormatBase< Derived, AddressType >::getAlignmentMask ( AddressType Length)
inlinestatic

Returns the "alignment mask" for an allocation of size Length.

This mask is 0 where the capability format alignment requires the address to be 0, and 1 otherwise.

Definition at line 26 of file CHERICapabilityFormat.h.

References llvm::Length.

Referenced by llvm::RVYCapabilityFormat< uint32_t, 10, 24 >::CHERICapabilityFormatBase< RVYCapabilityFormat< AddressType, MW, MAX_E >, AddressType >, and getRequiredAlignment().

◆ getRepresentableLength()

template<typename Derived, typename AddressType>
AddressType llvm::CHERICapabilityFormatBase< Derived, AddressType >::getRepresentableLength ( AddressType Length)
inlinestatic

Returns Length rounded up to the nearest representable allocation length.

Definition at line 37 of file CHERICapabilityFormat.h.

◆ getRequiredAlignment()

template<typename Derived, typename AddressType>
Align llvm::CHERICapabilityFormatBase< Derived, AddressType >::getRequiredAlignment ( AddressType Length)
inlinestatic

Returns the required alignment for an allocation of size Length.

Definition at line 31 of file CHERICapabilityFormat.h.

References AddressMask, getAlignmentMask(), and llvm::Length.

Member Data Documentation

◆ AddressMask

template<typename Derived, typename AddressType>
AddressType llvm::CHERICapabilityFormatBase< Derived, AddressType >::AddressMask = ~static_cast<AddressType>(0)
staticconstexpr

Definition at line 21 of file CHERICapabilityFormat.h.

Referenced by getRequiredAlignment().


The documentation for this struct was generated from the following file: