Skip to content

VarUniqueName

Class holding a unique name for a variable. Is attached to varRefs as a persistent attribute. This is used to assign absolute names to VarRefExp nodes during VariableRenaming.

Synopsis

Declared in <src/midend/programAnalysis/variableRenaming/VariableRenaming.h>

class VarUniqueName
    : public AstAttribute

Description

It handles complex case like : Additional comments by Liao 5/4/2012 using this pointer: this->member_x; using member of aggregate data: e.g. a.b.c.e how about a->b->c ?

Base Classes

Name Description
AstAttribute Base class for all IR node attribute values.

Member Functions

Name Description
VarUniqueName
VarUniqueName(); [constructor]
Constructors
copy
virtual VarUniqueName* copy() const override; [virtual]
getKey
std::vector<SgInitializedName*>& getKey();
Get a constant reference to the name.
getNameString
std::string getNameString();
Get the string representing this uniqueName
getOwnershipPolicy
virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const override; [virtual]
getUsesThis
bool getUsesThis();
setKey
void setKey(std::vector<SgInitializedName*> const& newKey);
Set the value of the name.
setUsesThis
void setUsesThis(bool uses);

Private Data Members

Name Description
key The vector of initializedNames that uniquely identifies this VarRef. The node which this name is attached to should be the last in the list. why a vector? in order to handle a.b.c ??
usesThis

Created with MrDocs