7 #ifndef RETDEC_LLVMIR2HLL_IR_CONST_STRUCT_H
8 #define RETDEC_LLVMIR2HLL_IR_CONST_STRUCT_H
36 using Type = std::vector<Item>;
A struct constant.
Definition: const_struct.h:30
Type value
Value of the constant.
Definition: const_struct.h:63
virtual bool isEqualTo(ShPtr< Value > otherValue) const override
Returns true if this value is equal to otherValue, false otherwise.
Definition: const_struct.cpp:38
static ShPtr< ConstStruct > create(Type value, ShPtr< StructType > type)
Creates a struct constant initialized to the given value.
Definition: const_struct.cpp:88
virtual void update(ShPtr< Value > subject, ShPtr< Value > arg=nullptr) override
Updates the structure according to the changes of subject.
Definition: const_struct.cpp:121
virtual ShPtr< retdec::llvmir2hll::Type > getType() const override
Returns the type of the expression.
Definition: const_struct.cpp:49
ShPtr< StructType > type
Type of the value.
Definition: const_struct.h:66
std::pair< ShPtr< ConstInt >, ShPtr< Expression > > Item
A single struct item (field name, value)
Definition: const_struct.h:33
virtual ShPtr< Value > clone() override
Returns a clone of the value.
Definition: const_struct.cpp:24
ConstStruct(Type value, ShPtr< StructType > type)
Constructs a struct constant initialized to the given value.
Definition: const_struct.cpp:21
Type getValue() const
Returns the constant's value.
Definition: const_struct.cpp:75
virtual void accept(Visitor *v) override
Visitor pattern implementation.
Definition: const_struct.cpp:137
std::vector< Item > Type
Underlying type for a struct constant.
Definition: const_struct.h:36
virtual void replace(ShPtr< Expression > oldExpr, ShPtr< Expression > newExpr) override
Replaces all occurrences of oldExpr with newExpr in the current expression.
Definition: const_struct.cpp:53
A base class for all constants.
Definition: constant.h:20
A base class of all visitors.
Definition: visitor.h:95
A base class for all constants.
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.