7 #ifndef RETDEC_LLVMIR2HLL_IR_FOR_LOOP_STMT_H
8 #define RETDEC_LLVMIR2HLL_IR_FOR_LOOP_STMT_H
static const uint64_t Undefined
Definition: address.h:47
A for loop statement.
Definition: for_loop_stmt.h:26
virtual void accept(Visitor *v) override
Visitor pattern implementation.
Definition: for_loop_stmt.cpp:284
ShPtr< Expression > step
Step.
Definition: for_loop_stmt.h:79
ShPtr< Expression > getStep() const
Returns the step.
Definition: for_loop_stmt.cpp:111
ShPtr< Variable > getIndVar() const
Returns the induction variable.
Definition: for_loop_stmt.cpp:90
ShPtr< Statement > getBody() const
Returns the body.
Definition: for_loop_stmt.cpp:118
virtual void replace(ShPtr< Expression > oldExpr, ShPtr< Expression > newExpr) override
Replaces all occurrences of oldExpr with newExpr in the current statement.
Definition: for_loop_stmt.cpp:53
virtual void update(ShPtr< Value > subject, ShPtr< Value > arg=nullptr) override
Updates the statement according to the changes of subject.
Definition: for_loop_stmt.cpp:255
virtual ShPtr< Expression > asExpression() const override
Returns the statement as an expression.
Definition: for_loop_stmt.cpp:82
void setStep(ShPtr< Expression > newStep)
Sets a new step.
Definition: for_loop_stmt.cpp:170
ShPtr< Expression > endCond
End condition.
Definition: for_loop_stmt.h:76
virtual bool isCompound() override
Returns true if the statement is a compound statement, false otherwise.
Definition: for_loop_stmt.h:35
void setBody(ShPtr< Statement > newBody)
Sets a new body.
Definition: for_loop_stmt.cpp:184
ForLoopStmt(ShPtr< Variable > indVar, ShPtr< Expression > startValue, ShPtr< Expression > endCond, ShPtr< Expression > step, ShPtr< Statement > body, Address a)
Constructs a new for loop statement.
Definition: for_loop_stmt.cpp:21
static ShPtr< ForLoopStmt > create(ShPtr< Variable > indVar, ShPtr< Expression > startValue, ShPtr< Expression > endCond, ShPtr< Expression > step, ShPtr< Statement > body, ShPtr< Statement > succ=nullptr, Address a=Address::Undefined)
Constructs a new for loop statement.
Definition: for_loop_stmt.cpp:212
ShPtr< Variable > indVar
Induction variable.
Definition: for_loop_stmt.h:70
virtual bool isEqualTo(ShPtr< Value > otherValue) const override
Returns true if this value is equal to otherValue, false otherwise.
Definition: for_loop_stmt.cpp:40
void setStartValue(ShPtr< Expression > newStartValue)
Sets a new start value.
Definition: for_loop_stmt.cpp:142
ShPtr< Expression > getEndCond() const
Returns the end condition.
Definition: for_loop_stmt.cpp:104
void setIndVar(ShPtr< Variable > newIndVar)
Sets a new induction variable.
Definition: for_loop_stmt.cpp:128
virtual ShPtr< Value > clone() override
Returns a clone of the value.
Definition: for_loop_stmt.cpp:27
ShPtr< Expression > startValue
Starting value.
Definition: for_loop_stmt.h:73
ShPtr< Expression > getStartValue() const
Returns the starting value.
Definition: for_loop_stmt.cpp:97
ShPtr< Statement > body
Body.
Definition: for_loop_stmt.h:82
void setEndCond(ShPtr< Expression > newEndCond)
Sets a new end condition.
Definition: for_loop_stmt.cpp:156
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 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.