clang  14.0.0git
Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::SanitizerMask Class Reference

#include "clang/Basic/Sanitizers.h"

Public Member Functions

 SanitizerMask ()=default
 
unsigned countPopulation () const
 
void flipAllBits ()
 
bool isPowerOf2 () const
 
llvm::hash_code hash_value () const
 
constexpr operator bool () const
 
constexpr bool operator== (const SanitizerMask &V) const
 
SanitizerMaskoperator&= (const SanitizerMask &RHS)
 
SanitizerMaskoperator|= (const SanitizerMask &RHS)
 
constexpr bool operator! () const
 
constexpr bool operator!= (const SanitizerMask &RHS) const
 

Static Public Member Functions

static constexpr bool checkBitPos (const unsigned Pos)
 
static constexpr SanitizerMask bitPosToMask (const unsigned Pos)
 Create a mask with a bit enabled at position Pos. More...
 

Friends

template<typename HasherT , llvm::support::endianness Endianness>
void addHash (llvm::HashBuilderImpl< HasherT, Endianness > &HBuilder, const SanitizerMask &SM)
 
constexpr friend SanitizerMask operator~ (SanitizerMask v)
 
constexpr friend SanitizerMask operator& (SanitizerMask a, const SanitizerMask &b)
 
constexpr friend SanitizerMask operator| (SanitizerMask a, const SanitizerMask &b)
 

Detailed Description

Definition at line 30 of file Sanitizers.h.

Constructor & Destructor Documentation

◆ SanitizerMask()

clang::SanitizerMask::SanitizerMask ( )
default

Referenced by bitPosToMask().

Member Function Documentation

◆ bitPosToMask()

static constexpr SanitizerMask clang::SanitizerMask::bitPosToMask ( const unsigned  Pos)
inlinestaticconstexpr

Create a mask with a bit enabled at position Pos.

Definition at line 55 of file Sanitizers.h.

References SanitizerMask().

◆ checkBitPos()

static constexpr bool clang::SanitizerMask::checkBitPos ( const unsigned  Pos)
inlinestaticconstexpr

Definition at line 50 of file Sanitizers.h.

◆ countPopulation()

unsigned clang::SanitizerMask::countPopulation ( ) const

Definition at line 61 of file Sanitizers.cpp.

Referenced by isPowerOf2().

◆ flipAllBits()

void clang::SanitizerMask::flipAllBits ( )
inline

Definition at line 65 of file Sanitizers.h.

◆ hash_value()

llvm::hash_code SanitizerMask::hash_value ( ) const

Definition at line 56 of file Sanitizers.cpp.

Referenced by clang::hash_value().

◆ isPowerOf2()

bool clang::SanitizerMask::isPowerOf2 ( ) const
inline

Definition at line 70 of file Sanitizers.h.

References countPopulation().

Referenced by clang::SanitizerSet::has(), and clang::SanitizerSet::set().

◆ operator bool()

constexpr clang::SanitizerMask::operator bool ( ) const
inlineexplicitconstexpr

Definition at line 82 of file Sanitizers.h.

◆ operator!()

constexpr bool clang::SanitizerMask::operator! ( ) const
inlineconstexpr

Definition at line 103 of file Sanitizers.h.

References bool.

◆ operator!=()

constexpr bool clang::SanitizerMask::operator!= ( const SanitizerMask RHS) const
inlineconstexpr

Definition at line 105 of file Sanitizers.h.

◆ operator&=()

SanitizerMask& clang::SanitizerMask::operator&= ( const SanitizerMask RHS)
inline

Definition at line 91 of file Sanitizers.h.

◆ operator==()

constexpr bool clang::SanitizerMask::operator== ( const SanitizerMask V) const
inlineconstexpr

Definition at line 86 of file Sanitizers.h.

References V.

◆ operator|=()

SanitizerMask& clang::SanitizerMask::operator|= ( const SanitizerMask RHS)
inline

Definition at line 97 of file Sanitizers.h.

Friends And Related Function Documentation

◆ addHash

template<typename HasherT , llvm::support::endianness Endianness>
void addHash ( llvm::HashBuilderImpl< HasherT, Endianness > &  HBuilder,
const SanitizerMask SM 
)
friend

Definition at line 77 of file Sanitizers.h.

◆ operator&

constexpr friend SanitizerMask operator& ( SanitizerMask  a,
const SanitizerMask b 
)
friend

Definition at line 113 of file Sanitizers.h.

◆ operator|

constexpr friend SanitizerMask operator| ( SanitizerMask  a,
const SanitizerMask b 
)
friend

Definition at line 119 of file Sanitizers.h.

◆ operator~

constexpr friend SanitizerMask operator~ ( SanitizerMask  v)
friend

Definition at line 109 of file Sanitizers.h.


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