13#ifndef LLVM_TABLEGEN_STRINGMATCHER_H
14#define LLVM_TABLEGEN_STRINGMATCHER_H
36 const std::vector<StringPair> &Matches;
41 const std::vector<StringPair> &matches,
raw_ostream &os)
42 : StrVariableName(strVariableName), Matches(matches),
OS(os) {}
44 void Emit(
unsigned Indent = 0,
bool IgnoreDuplicates =
false)
const;
47 bool EmitStringMatcherForChar(
const std::vector<const StringPair *> &Matches,
48 unsigned CharNo,
unsigned IndentCount,
49 bool IgnoreDuplicates)
const;
Given a list of strings and code to execute when they match, output a simple switch tree to classify ...
StringMatcher(StringRef strVariableName, const std::vector< StringPair > &matches, raw_ostream &os)
void Emit(unsigned Indent=0, bool IgnoreDuplicates=false) const
Emit - Top level entry point.
std::pair< std::string, std::string > StringPair
StringRef - Represent a constant reference to a string, i.e.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.