llvm::ScopedPrinter::printEnum

Print an enumeration value by name when known, otherwise as hex.

Synopsis

Declared in <llvm/Support/ScopedPrinter.h>

template<
    typename T,
    typename TEnum,
    unsigned int NumStrs>
void
printEnum(
    StringRef Label,
    T Value,
    EnumStrings<TEnum, NumStrs> EnumValues);

Template Parameters

NameDescription
TNumeric type of the enumeration value.
TEnumEnumeration type described by EnumValues.
NumStrsNumber of string entries in EnumValues.

Parameters

NameDescription
LabelField label to print.
ValueEnumeration value to print.
EnumValuesMapping from values to display names.