7 #ifndef RETDEC_LLVMIR2HLL_IR_VAR_DEF_STMT_H
8 #define RETDEC_LLVMIR2HLL_IR_VAR_DEF_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 variable definition statement.
Definition: var_def_stmt.h:26
virtual bool isEqualTo(ShPtr< Value > otherValue) const override
Returns true if this value is equal to otherValue, false otherwise.
Definition: var_def_stmt.cpp:34
virtual void accept(Visitor *v) override
Visitor pattern implementation.
Definition: var_def_stmt.cpp:183
ShPtr< Expression > init
Variable initializer.
Definition: var_def_stmt.h:68
virtual bool isCompound() override
Returns true if the statement is a compound statement, false otherwise.
Definition: var_def_stmt.h:35
ShPtr< Variable > getVar() const
Return the variable.
Definition: var_def_stmt.cpp:67
virtual void update(ShPtr< Value > subject, ShPtr< Value > arg=nullptr) override
Updates the statement according to the changes of subject.
Definition: var_def_stmt.cpp:168
virtual ShPtr< Expression > asExpression() const override
Returns the statement as an expression.
Definition: var_def_stmt.cpp:59
VarDefStmt(ShPtr< Variable > var, ShPtr< Expression > init=nullptr, Address a=Address::Undefined)
Constructs a new variable definition statement.
Definition: var_def_stmt.cpp:21
static ShPtr< VarDefStmt > create(ShPtr< Variable > var, ShPtr< Expression > init=nullptr, ShPtr< Statement > succ=nullptr, Address a=Address::Undefined)
Creates a new variable definition statement.
Definition: var_def_stmt.cpp:132
virtual ShPtr< Value > clone() override
Returns a clone of the value.
Definition: var_def_stmt.cpp:24
void setInitializer(ShPtr< Expression > newInit)
Sets a new initializer.
Definition: var_def_stmt.cpp:104
void setVar(ShPtr< Variable > newVar)
Sets a new variable.
Definition: var_def_stmt.cpp:93
ShPtr< Expression > getInitializer() const
Returns the variable initializer.
Definition: var_def_stmt.cpp:76
virtual void replace(ShPtr< Expression > oldExpr, ShPtr< Expression > newExpr) override
Replaces all occurrences of oldExpr with newExpr in the current statement.
Definition: var_def_stmt.cpp:43
bool hasInitializer() const
Returns true if the statement has an initializer, false otherwise.
Definition: var_def_stmt.cpp:83
ShPtr< Variable > var
Variable.
Definition: var_def_stmt.h:65
void removeInitializer()
Removes the initializer.
Definition: var_def_stmt.cpp:117
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.