LLVM 23.0.0git
llvm::instrumentor::BaseConfigTy< EnumTy > Struct Template Reference

Boolean option bitset with a compile-time number of bits to store as many options as the enumeration type EnumTy defines. More...

#include "llvm/Transforms/IPO/InstrumentorUtils.h"

Inheritance diagram for llvm::instrumentor::BaseConfigTy< EnumTy >:
[legend]

Public Member Functions

 BaseConfigTy (bool Enable=true)
 Construct the option bitset with all bits set to Enable.
bool has (EnumTy Opt) const
 Check if the option Opt is enabled.
void set (EnumTy Opt, bool Value=true)
 Set the boolean value of option Opt to Value.

Public Attributes

std::bitset< static_cast< int >(EnumTy::NumConfig)> Options
 The bistset with as many bits as the enumeration's values.

Detailed Description

template<typename EnumTy>
struct llvm::instrumentor::BaseConfigTy< EnumTy >

Boolean option bitset with a compile-time number of bits to store as many options as the enumeration type EnumTy defines.

The enumeration type is expected to have an ascending and consecutive values, starting at zero, and the last value being artificial and named as NumConfig (i.e., the number of values in the enumeration).

Definition at line 147 of file InstrumentorUtils.h.

Constructor & Destructor Documentation

◆ BaseConfigTy()

template<typename EnumTy>
llvm::instrumentor::BaseConfigTy< EnumTy >::BaseConfigTy ( bool Enable = true)
inline

Construct the option bitset with all bits set to Enable.

If not provided, all options are enabled.

Definition at line 153 of file InstrumentorUtils.h.

Member Function Documentation

◆ has()

template<typename EnumTy>
bool llvm::instrumentor::BaseConfigTy< EnumTy >::has ( EnumTy Opt) const
inline

Check if the option Opt is enabled.

Definition at line 159 of file InstrumentorUtils.h.

◆ set()

template<typename EnumTy>
void llvm::instrumentor::BaseConfigTy< EnumTy >::set ( EnumTy Opt,
bool Value = true )
inline

Set the boolean value of option Opt to Value.

Definition at line 162 of file InstrumentorUtils.h.

Member Data Documentation

◆ Options

template<typename EnumTy>
std::bitset<static_cast<int>(EnumTy::NumConfig)> llvm::instrumentor::BaseConfigTy< EnumTy >::Options

The bistset with as many bits as the enumeration's values.

Definition at line 149 of file InstrumentorUtils.h.


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