7 #ifndef RETDEC_LLVMIR2HLL_PATTERN_PATTERNS_STMTS_PATTERN_H
8 #define RETDEC_LLVMIR2HLL_PATTERN_PATTERNS_STMTS_PATTERN_H
30 virtual void print(llvm::raw_ostream &os,
31 const std::string &indentation =
"")
const override;
A base class for representing code patterns.
Definition: pattern.h:25
A pattern that is composed of zero or more statements.
Definition: stmts_pattern.h:24
stmt_iterator stmt_end() const
Returns an iterator past the last statement in the pattern.
Definition: stmts_pattern.cpp:76
static ShPtr< StmtsPattern > create()
Creates an empty pattern.
Definition: stmts_pattern.cpp:83
StmtsPattern()
Constructs an empty pattern.
Definition: stmts_pattern.cpp:16
stmt_iterator stmt_begin() const
Returns an iterator to the first statement in the pattern.
Definition: stmts_pattern.cpp:66
StmtVector stmts
Statements that form the pattern.
Definition: stmts_pattern.h:51
bool isEmpty() const
Returns true if the pattern is empty, false otherwise.
Definition: stmts_pattern.cpp:39
virtual void print(llvm::raw_ostream &os, const std::string &indentation="") const override
Prints the pattern to stream os, each line indented with indentation.
Definition: stmts_pattern.cpp:25
void addStmt(ShPtr< Statement > stmt)
Adds a new statement into the pattern.
Definition: stmts_pattern.cpp:49
StmtVector::const_iterator stmt_iterator
Iterator over statements.
Definition: stmts_pattern.h:27
StmtVector::size_type getNumOfStmts() const
Returns the number of statements in the pattern.
Definition: stmts_pattern.cpp:56
A base class for representing code patterns.
A library providing API for working with back-end IR.
std::shared_ptr< T > ShPtr
An alias for a shared pointer.
Definition: smart_ptr.h:18
std::vector< ShPtr< Statement > > StmtVector
Vector of statements.
Definition: types.h:96
Definition: archive_wrapper.h:19
Declarations, aliases, macros, etc. for the use of smart pointers.
Aliases for several useful types.