diff --git a/src/ir/Variable.cpp b/src/ir/Variable.cpp index d051b9ca1..85ae21005 100644 --- a/src/ir/Variable.cpp +++ b/src/ir/Variable.cpp @@ -28,6 +28,10 @@ std::string const& Variable::getName() const { return variableName; } +uint_fast64_t getIndex() const { + return index; +} + // Return the expression for the initial value of the variable. std::shared_ptr const& Variable::getInitialValue() const { return initialValue; diff --git a/src/ir/Variable.h b/src/ir/Variable.h index 2c065a004..6f31280e2 100644 --- a/src/ir/Variable.h +++ b/src/ir/Variable.h @@ -41,6 +41,12 @@ public: */ std::string const& getName() const; + /*! + * Retrieves the index of the variable. + * @returns the index of the variable. + */ + uint_fast64_t getIndex() const; + /*! * Retrieves the expression defining the initial value of the variable. * @returns the expression defining the initial value of the variable.