7 #ifndef RETDEC_LLVMIR2HLL_IR_VARIABLE_H
8 #define RETDEC_LLVMIR2HLL_IR_VARIABLE_H
41 const std::string &
getName()
const;
48 void setName(
const std::string &newName);
static const uint64_t Undefined
Definition: address.h:47
A base class of all expressions.
Definition: expression.h:23
A representation of a variable.
Definition: variable.h:28
void setType(ShPtr< Type > newType)
Sets the variable's type to newType.
Definition: variable.cpp:136
void markAsExternal()
Sets the variable as external.
Definition: variable.cpp:162
static ShPtr< Variable > create(const std::string &name, ShPtr< Type > type, Address a=Address::Undefined)
Creates a new variable.
Definition: variable.cpp:179
Address address
Definition: variable.h:81
virtual ShPtr< Value > clone() override
Returns a clone of the value.
Definition: variable.cpp:23
void setAddress(Address a)
Definition: variable.cpp:142
virtual bool isEqualTo(ShPtr< Value > otherValue) const override
Returns true if this value is equal to otherValue, false otherwise.
Definition: variable.cpp:28
std::string name
Name of the variable.
Definition: variable.h:70
ShPtr< Type > type
Type of the variable.
Definition: variable.h:73
virtual ShPtr< Type > getType() const override
Returns the type of the variable.
Definition: variable.cpp:75
ShPtr< Variable > copy() const
Returns a copy of this variable.
Definition: variable.cpp:116
void markAsInternal()
Sets the variable as internal.
Definition: variable.cpp:152
virtual void accept(Visitor *v) override
Visitor pattern implementation.
Definition: variable.cpp:187
virtual void replace(ShPtr< Expression > oldExpr, ShPtr< Expression > newExpr) override
Replaces all occurrences of oldExpr with newExpr in the current expression.
Definition: variable.cpp:39
bool isInternal() const
Returns true if the variable is internal, false otherwise.
Definition: variable.cpp:96
const std::string & getInitialName() const
Returns the initial name of the variable.
Definition: variable.cpp:50
std::string initialName
Initial name of the variable.
Definition: variable.h:67
bool hasName() const
Returns true if the variable has name, false otherwise.
Definition: variable.cpp:68
const std::string & getName() const
Returns the name of the variable.
Definition: variable.cpp:57
void setName(const std::string &newName)
Sets the variable's name to newName.
Definition: variable.cpp:126
Address getAddress() const
Definition: variable.cpp:61
bool isExternal() const
Returns true if the variable is external, false otherwise.
Definition: variable.cpp:105
Variable(const std::string &name, ShPtr< Type > type, Address a=Address::Undefined)
Constructs a new variable.
Definition: variable.cpp:20
A base class of all visitors.
Definition: visitor.h:95
A base class of all expressions.
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.
Aliases for several useful types.