LLVM 20.0.0git
|
Type representing the format an expression value should be textualized into for matching. More...
#include "FileCheck/FileCheckImpl.h"
Public Types | |
enum class | Kind { NoFormat , Unsigned , Signed , HexUpper , HexLower } |
Public Member Functions | |
operator bool () const | |
Evaluates a format to true if it can be used in a match. | |
bool | operator== (const ExpressionFormat &Other) const |
Define format equality: formats are equal if neither is NoFormat and their kinds and precision are the same. | |
bool | operator!= (const ExpressionFormat &Other) const |
bool | operator== (Kind OtherValue) const |
bool | operator!= (Kind OtherValue) const |
StringRef | toString () const |
ExpressionFormat () | |
ExpressionFormat (Kind Value) | |
ExpressionFormat (Kind Value, unsigned Precision) | |
ExpressionFormat (Kind Value, unsigned Precision, bool AlternateForm) | |
Expected< std::string > | getWildcardRegex () const |
Expected< std::string > | getMatchingString (APInt Value) const |
APInt | valueFromStringRepr (StringRef StrVal, const SourceMgr &SM) const |
Type representing the format an expression value should be textualized into for matching.
Used to represent both explicit format specifiers as well as implicit format from using numeric variables.
Definition at line 38 of file FileCheckImpl.h.
|
strong |
Enumerator | |
---|---|
NoFormat | Denote absence of format. Used for implicit format of literals and empty expressions. |
Unsigned | Value is an unsigned integer and should be printed as a decimal number. |
Signed | Value is a signed integer and should be printed as a decimal number. |
HexUpper | Value should be printed as an uppercase hex number. |
HexLower | Value should be printed as a lowercase hex number. |
Definition at line 39 of file FileCheckImpl.h.
|
inline |
Definition at line 81 of file FileCheckImpl.h.
|
inlineexplicit |
Definition at line 82 of file FileCheckImpl.h.
Definition at line 83 of file FileCheckImpl.h.
|
inlineexplicit |
Definition at line 85 of file FileCheckImpl.h.
Value
in the format represented by this instance, or an error if conversion to this format failed or the format is NoFormat. Definition at line 81 of file FileCheck.cpp.
References llvm::APInt::abs(), llvm::createStringError(), HexLower, HexUpper, llvm::APInt::isNegative(), Signed, llvm::SmallVectorBase< Size_T >::size(), llvm::APInt::toString(), and Unsigned.
Expected< std::string > ExpressionFormat::getWildcardRegex | ( | ) | const |
Definition at line 48 of file FileCheck.cpp.
References llvm::createStringError(), HexLower, HexUpper, Signed, and Unsigned.
|
inlineexplicit |
Evaluates a format to true if it can be used in a match.
Definition at line 61 of file FileCheckImpl.h.
References NoFormat.
|
inline |
Definition at line 70 of file FileCheckImpl.h.
References llvm::Other.
Definition at line 76 of file FileCheckImpl.h.
|
inline |
Define format equality: formats are equal if neither is NoFormat and their kinds and precision are the same.
Definition at line 65 of file FileCheckImpl.h.
References NoFormat, and llvm::Other.
Definition at line 74 of file FileCheckImpl.h.
StringRef ExpressionFormat::toString | ( | ) | const |
Definition at line 32 of file FileCheck.cpp.
References HexLower, HexUpper, llvm_unreachable, NoFormat, Signed, and Unsigned.
StrVal
according to the matching format represented by this instance. Definition at line 137 of file FileCheck.cpp.
References assert(), HexLower, HexUpper, Signed, and llvm::dwarf::toSigned().