class StringMatcher
Declaration
class StringMatcher { /* full declaration omitted */ };
Description
Given a list of strings and code to execute when they match, output a simple switch tree to classify the input string. If a match is found, the code in Matches[i].second is executed; control must not exit this code fragment. If nothing matches, execution falls through.
Declared at: llvm/include/llvm/TableGen/StringMatcher.h:30
Member Variables
- private llvm::StringRef StrVariableName
- private const std::vector<StringPair>& Matches
- private llvm::raw_ostream& OS
Method Overview
- public void Emit(unsigned int Indent = 0, bool IgnoreDuplicates = false) const
- private bool EmitStringMatcherForChar(const std::vector<const StringPair *> & Matches, unsigned int CharNo, unsigned int IndentCount, bool IgnoreDuplicates) const
- public StringMatcher(llvm::StringRef strVariableName, const std::vector<StringPair> & matches, llvm::raw_ostream & os)
Methods
¶void Emit(unsigned int Indent = 0,
bool IgnoreDuplicates = false) const
void Emit(unsigned int Indent = 0,
bool IgnoreDuplicates = false) const
Declared at: llvm/include/llvm/TableGen/StringMatcher.h:44
Parameters
- unsigned int Indent = 0
- bool IgnoreDuplicates = false
¶bool EmitStringMatcherForChar(
const std::vector<const StringPair*>& Matches,
unsigned int CharNo,
unsigned int IndentCount,
bool IgnoreDuplicates) const
bool EmitStringMatcherForChar(
const std::vector<const StringPair*>& Matches,
unsigned int CharNo,
unsigned int IndentCount,
bool IgnoreDuplicates) const
Declared at: llvm/include/llvm/TableGen/StringMatcher.h:47
Parameters
- const std::vector<const StringPair*>& Matches
- unsigned int CharNo
- unsigned int IndentCount
- bool IgnoreDuplicates
¶StringMatcher(
llvm::StringRef strVariableName,
const std::vector<StringPair>& matches,
llvm::raw_ostream& os)
StringMatcher(
llvm::StringRef strVariableName,
const std::vector<StringPair>& matches,
llvm::raw_ostream& os)
Declared at: llvm/include/llvm/TableGen/StringMatcher.h:40
Parameters
- llvm::StringRef strVariableName
- const std::vector<StringPair>& matches
- llvm::raw_ostream& os