LLVM  6.0.0svn
Public Types | Public Member Functions | List of all members
llvm::StringMatcher Class Reference

StringMatcher - Given a list of strings and code to execute when they match, output a simple switch tree to classify the input string. More...

#include "llvm/TableGen/StringMatcher.h"

Public Types

using StringPair = std::pair< std::string, std::string >
 

Public Member Functions

 StringMatcher (StringRef strVariableName, const std::vector< StringPair > &matches, raw_ostream &os)
 
void Emit (unsigned Indent=0) const
 Emit - Top level entry point. More...
 

Detailed Description

StringMatcher - 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 Vals[i].second is executed; control must not exit this code fragment. If nothing matches, execution falls through.

Definition at line 32 of file StringMatcher.h.

Member Typedef Documentation

◆ StringPair

using llvm::StringMatcher::StringPair = std::pair<std::string, std::string>

Definition at line 34 of file StringMatcher.h.

Constructor & Destructor Documentation

◆ StringMatcher()

llvm::StringMatcher::StringMatcher ( StringRef  strVariableName,
const std::vector< StringPair > &  matches,
raw_ostream os 
)
inline

Definition at line 42 of file StringMatcher.h.

References Emit().

Member Function Documentation

◆ Emit()

void StringMatcher::Emit ( unsigned  Indent = 0) const

Emit - Top level entry point.

Definition at line 129 of file StringMatcher.cpp.

References E, first, and llvm::raw_ostream::indent().

Referenced by StringMatcher().


The documentation for this class was generated from the following files: