clang 20.0.0git
Public Types | Public Member Functions | List of all members
clang::PointerAuthSchema Class Reference

#include "clang/Basic/PointerAuthOptions.h"

Public Types

enum class  Kind : unsigned { None , ARM8_3 }
 
enum class  ARM8_3Key : unsigned { ASIA = 0 , ASIB = 1 , ASDA = 2 , ASDB = 3 }
 Hardware pointer-signing keys in ARM8.3. More...
 
enum class  Discrimination : unsigned { None , Type , Decl , Constant }
 Forms of extra discrimination. More...
 

Public Member Functions

 PointerAuthSchema ()
 
 PointerAuthSchema (ARM8_3Key Key, bool IsAddressDiscriminated, PointerAuthenticationMode AuthenticationMode, Discrimination OtherDiscrimination, std::optional< uint16_t > ConstantDiscriminatorOrNone=std::nullopt, bool IsIsaPointer=false, bool AuthenticatesNullValues=false)
 
 PointerAuthSchema (ARM8_3Key Key, bool IsAddressDiscriminated, Discrimination OtherDiscrimination, std::optional< uint16_t > ConstantDiscriminatorOrNone=std::nullopt, bool IsIsaPointer=false, bool AuthenticatesNullValues=false)
 
Kind getKind () const
 
 operator bool () const
 
bool isEnabled () const
 
bool isAddressDiscriminated () const
 
bool isIsaPointer () const
 
bool authenticatesNullValues () const
 
bool hasOtherDiscrimination () const
 
Discrimination getOtherDiscrimination () const
 
uint16_t getConstantDiscrimination () const
 
unsigned getKey () const
 
PointerAuthenticationMode getAuthenticationMode () const
 
ARM8_3Key getARM8_3Key () const
 

Detailed Description

Definition at line 37 of file PointerAuthOptions.h.

Member Enumeration Documentation

◆ ARM8_3Key

Hardware pointer-signing keys in ARM8.3.

These values are the same used in ptrauth.h.

Enumerator
ASIA 
ASIB 
ASDA 
ASDB 

Definition at line 47 of file PointerAuthOptions.h.

◆ Discrimination

Forms of extra discrimination.

Enumerator
None 

No additional discrimination.

Type 

Include a hash of the entity's type.

Decl 

Include a hash of the entity's identity.

Constant 

Discriminate using a constant value.

Definition at line 55 of file PointerAuthOptions.h.

◆ Kind

Enumerator
None 
ARM8_3 

Definition at line 39 of file PointerAuthOptions.h.

Constructor & Destructor Documentation

◆ PointerAuthSchema() [1/3]

clang::PointerAuthSchema::PointerAuthSchema ( )
inline

Definition at line 80 of file PointerAuthOptions.h.

◆ PointerAuthSchema() [2/3]

clang::PointerAuthSchema::PointerAuthSchema ( ARM8_3Key  Key,
bool  IsAddressDiscriminated,
PointerAuthenticationMode  AuthenticationMode,
Discrimination  OtherDiscrimination,
std::optional< uint16_t >  ConstantDiscriminatorOrNone = std::nullopt,
bool  IsIsaPointer = false,
bool  AuthenticatesNullValues = false 
)
inline

Definition at line 82 of file PointerAuthOptions.h.

References Constant, and getOtherDiscrimination().

◆ PointerAuthSchema() [3/3]

clang::PointerAuthSchema::PointerAuthSchema ( ARM8_3Key  Key,
bool  IsAddressDiscriminated,
Discrimination  OtherDiscrimination,
std::optional< uint16_t >  ConstantDiscriminatorOrNone = std::nullopt,
bool  IsIsaPointer = false,
bool  AuthenticatesNullValues = false 
)
inline

Definition at line 100 of file PointerAuthOptions.h.

Member Function Documentation

◆ authenticatesNullValues()

bool clang::PointerAuthSchema::authenticatesNullValues ( ) const
inline

Definition at line 126 of file PointerAuthOptions.h.

References getKind(), and None.

◆ getARM8_3Key()

ARM8_3Key clang::PointerAuthSchema::getARM8_3Key ( ) const
inline

Definition at line 159 of file PointerAuthOptions.h.

References ARM8_3, and getKind().

Referenced by getKey().

◆ getAuthenticationMode()

PointerAuthenticationMode clang::PointerAuthSchema::getAuthenticationMode ( ) const
inline

◆ getConstantDiscrimination()

uint16_t clang::PointerAuthSchema::getConstantDiscrimination ( ) const
inline

◆ getKey()

unsigned clang::PointerAuthSchema::getKey ( ) const
inline

◆ getKind()

Kind clang::PointerAuthSchema::getKind ( ) const
inline

◆ getOtherDiscrimination()

Discrimination clang::PointerAuthSchema::getOtherDiscrimination ( ) const
inline

◆ hasOtherDiscrimination()

bool clang::PointerAuthSchema::hasOtherDiscrimination ( ) const
inline

Definition at line 131 of file PointerAuthOptions.h.

References getOtherDiscrimination(), and None.

◆ isAddressDiscriminated()

bool clang::PointerAuthSchema::isAddressDiscriminated ( ) const
inline

◆ isEnabled()

bool clang::PointerAuthSchema::isEnabled ( ) const
inline

Definition at line 114 of file PointerAuthOptions.h.

References getKind(), and None.

Referenced by operator bool().

◆ isIsaPointer()

bool clang::PointerAuthSchema::isIsaPointer ( ) const
inline

Definition at line 121 of file PointerAuthOptions.h.

References getKind(), and None.

◆ operator bool()

clang::PointerAuthSchema::operator bool ( ) const
inlineexplicit

Definition at line 112 of file PointerAuthOptions.h.

References isEnabled().


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