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 LLVM_ABI AddressType getAlignmentMask (AddressType Length)
 Returns the "alignment mask" for an allocation of size Length.
static LLVM_ABI Align getRequiredAlignment (AddressType Length)
 Returns the required alignment for an allocation of size Length.
static LLVM_ABI 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>
LLVM_ABI AddressType llvm::CHERICapabilityFormatBase< Derived, AddressType >::getAlignmentMask ( AddressType Length)
static

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.

References llvm::Length, and LLVM_ABI.

◆ getRepresentableLength()

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

Returns Length rounded up to the nearest representable allocation length.

Definition at line 22 of file CHERICapabilityFormat.cpp.

References llvm::Length.

◆ getRequiredAlignment()

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

Returns the required alignment for an allocation of size Length.

Definition at line 15 of file CHERICapabilityFormat.cpp.

References AddressMask, 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 files: