7 #ifndef RETDEC_LLVMIR2HLL_IR_CONST_ARRAY_H
8 #define RETDEC_LLVMIR2HLL_IR_CONST_ARRAY_H
std::vector< std::size_t > Dimensions
Array dimensions.
Definition: array_type.h:30
An array constant.
Definition: const_array.h:30
ShPtr< ArrayType > type
The type of the array.
Definition: const_array.h:81
ArrayValue::const_iterator init_iterator
Initialized array iterator.
Definition: const_array.h:36
init_iterator init_begin() const
Returns an iterator to the first item of the initialized array.
Definition: const_array.cpp:117
virtual void update(ShPtr< Value > subject, ShPtr< Value > arg=nullptr) override
Updates the array according to the changes of subject.
Definition: const_array.cpp:229
bool isInitialized() const
Returns true if the array is initialized, false otherwise.
Definition: const_array.cpp:140
virtual void replace(ShPtr< Expression > oldExpr, ShPtr< Expression > newExpr) override
Replaces all occurrences of oldExpr with newExpr in the current expression.
Definition: const_array.cpp:77
static ShPtr< ConstArray > create(ArrayValue value, ShPtr< ArrayType > type)
Creates an array constant initialized to the given value and type.
Definition: const_array.cpp:182
std::vector< ShPtr< Expression > > ArrayValue
Underlying type of the array's value.
Definition: const_array.h:33
bool isEmpty() const
Returns true if the array is empty, false otherwise.
Definition: const_array.cpp:150
virtual ShPtr< Value > clone() override
Returns a clone of the value.
Definition: const_array.cpp:24
ArrayType::Dimensions getDimensions() const
Returns the dimensions of the array.
Definition: const_array.cpp:168
ConstArray(ArrayValue value, ShPtr< ArrayType > type)
Constructs an array constant.
Definition: const_array.cpp:21
virtual bool isEqualTo(ShPtr< Value > otherValue) const override
Returns true if this value is equal to otherValue, false otherwise.
Definition: const_array.cpp:35
ArrayValue value
Value of an initialized array.
Definition: const_array.h:75
virtual ShPtr< Type > getType() const override
Returns the type of the expression.
Definition: const_array.cpp:73
const ArrayValue & getInitializedValue() const
Returns the value of an initialized array.
Definition: const_array.cpp:103
virtual void accept(Visitor *v) override
Visitor pattern implementation.
Definition: const_array.cpp:247
ShPtr< Type > getContainedType() const
Returns the type of items in the array.
Definition: const_array.cpp:161
bool initialized
Is the array initialized?
Definition: const_array.h:78
static ShPtr< ConstArray > createUninitialized(ShPtr< ArrayType > type)
Creates an uninitialized array constant of the given type.
Definition: const_array.cpp:205
init_iterator init_end() const
Returns an iterator past the last item of the initialized array.
Definition: const_array.cpp:131
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 representation of an array type.
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.