23 std::vector<SgInitializedName*> key;
43 key.push_back(thisNode);
56 key.assign(prefix.begin(), prefix.end());
57 key.push_back(thisNode);
66 key.assign(other.key.begin(), other.key.end());
79 const std::vector<SgInitializedName*>&
getKey()
88 void setKey(
const std::vector<SgInitializedName*>& newKey)
90 key.assign(newKey.begin(), newKey.end());
98 void setUsesThis(
bool uses)
109 std::string name =
"";
110 std::vector<SgInitializedName*>::iterator iter;
113 for (iter = key.begin(); iter != key.end(); ++iter)
115 if (iter != key.begin())
119 name += (*iter)->get_name().getString();
157 std::vector<SgInitializedName*> allInitNames;
165 const bool treatPointersAsStructs;
169 const bool propagateNamesThroughComma;
177 typedef std::vector<SgInitializedName*>
VarName;
183 bool treatPointersAsStructs =
true,
bool propagateNamesThroughComma =
true) : allInitNames(allNames),
184 treatPointersAsStructs(treatPointersAsStructs), propagateNamesThroughComma(propagateNamesThroughComma)
VarUniqueName()
Constructs the attribute with an empty key.
Class to traverse the AST and assign unique names to every varRef.
VarUniqueName(SgInitializedName *thisNode)
Constructs the attribute with value thisNode.
VariableReferenceSet()
Default constructor.
Attribute Evaluator for synthesized attributes.
static std::string varKeyTag
Tag to use to retrieve unique naming key from node.
This class represents the notion of a declared variable.
VarUniqueName * copy() const
Virtual copy constructor.
VarUniqueName(const VarUniqueName &other)
Copy the attribute.
std::string getNameString()
Get the string representing this uniqueName.
Base class for all IR node attribute values.
This class represents the base class for all IR nodes within Sage III.
void setKey(const std::vector< SgInitializedName * > &newKey)
Set the value of the name.
virtual VariableReferenceSet evaluateSynthesizedAttribute(SgNode *node, SynthesizedAttributesList attrs)
Called to evaluate the synthesized attribute on every node.
VarUniqueName(const std::vector< SgInitializedName * > &prefix, SgInitializedName *thisNode)
Constructs the attribute using the prefix vector and thisNode.
UniqueNameTraversal(const std::vector< SgInitializedName * > &allNames, bool treatPointersAsStructs=true, bool propagateNamesThroughComma=true)
const std::vector< SgInitializedName * > & getKey()
Get a constant reference to the name.
Class holding a unique name for a variable.
std::vector< SgInitializedName * > VarName
A compound variable name as used by the variable renaming.
Attribute that describes the variables modified by a given expression.