7 #ifndef RETDEC_LLVMIR2HLL_IR_WHILE_LOOP_STMT_H
8 #define RETDEC_LLVMIR2HLL_IR_WHILE_LOOP_STMT_H
static const uint64_t Undefined
Definition: address.h:47
A representation of a program statement.
Definition: statement.h:39
ShPtr< Statement > succ
Successor statement.
Definition: statement.h:141
A base class of all visitors.
Definition: visitor.h:95
A while loop statement.
Definition: while_loop_stmt.h:25
WhileLoopStmt(ShPtr< Expression > cond, ShPtr< Statement > body, Address a=Address::Undefined)
Constructs a new while loop statement.
Definition: while_loop_stmt.cpp:21
ShPtr< Expression > getCondition() const
Returns the loop condition.
Definition: while_loop_stmt.cpp:59
static ShPtr< WhileLoopStmt > create(ShPtr< Expression > cond, ShPtr< Statement > body, ShPtr< Statement > succ=nullptr, Address a=Address::Undefined)
Constructs a new while loop statement.
Definition: while_loop_stmt.cpp:112
void setBody(ShPtr< Statement > newBody)
Sets a new body.
Definition: while_loop_stmt.cpp:90
ShPtr< Statement > body
Loop body.
Definition: while_loop_stmt.h:63
virtual void replace(ShPtr< Expression > oldExpr, ShPtr< Expression > newExpr) override
Replaces all occurrences of oldExpr with newExpr in the current statement.
Definition: while_loop_stmt.cpp:43
void setCondition(ShPtr< Expression > newCond)
Sets a condition.
Definition: while_loop_stmt.cpp:76
virtual ShPtr< Expression > asExpression() const override
Returns the statement as an expression.
Definition: while_loop_stmt.cpp:51
ShPtr< Expression > cond
Loop condition.
Definition: while_loop_stmt.h:60
ShPtr< Statement > getBody() const
Returns the loop body.
Definition: while_loop_stmt.cpp:66
virtual bool isCompound() override
Returns true if the statement is a compound statement, false otherwise.
Definition: while_loop_stmt.h:32
virtual void accept(Visitor *v) override
Visitor pattern implementation.
Definition: while_loop_stmt.cpp:162
virtual bool isEqualTo(ShPtr< Value > otherValue) const override
Returns true if this value is equal to otherValue, false otherwise.
Definition: while_loop_stmt.cpp:33
virtual void update(ShPtr< Value > subject, ShPtr< Value > arg=nullptr) override
Updates the statement according to the changes of subject.
Definition: while_loop_stmt.cpp:147
virtual ShPtr< Value > clone() override
Returns a clone of the value.
Definition: while_loop_stmt.cpp:25
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
Definition: archive_wrapper.h:19
Declarations, aliases, macros, etc. for the use of smart pointers.
A representation of a program statement.