14 #ifndef LLVM_TABLEGEN_STRINGMATCHER_H
15 #define LLVM_TABLEGEN_STRINGMATCHER_H
37 const std::vector<StringPair> &Matches;
42 const std::vector<StringPair> &matches,
raw_ostream &os)
43 : StrVariableName(strVariableName), Matches(matches), OS(os) {}
45 void Emit(
unsigned Indent = 0)
const;
48 bool EmitStringMatcherForChar(
const std::vector<const StringPair*> &Matches,
49 unsigned CharNo,
unsigned IndentCount)
const;
std::pair< std::string, std::string > StringPair
StringMatcher(StringRef strVariableName, const std::vector< StringPair > &matches, raw_ostream &os)
StringMatcher - Given a list of strings and code to execute when they match, output a simple switch t...
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.
void Emit(unsigned Indent=0) const
Emit - Top level entry point.