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)
Base class for all IR node attribute values.
Attribute Evaluator for synthesized attributes.
This class represents the notion of a declared variable.
This class represents the base class for all IR nodes within Sage III.
Class to traverse the AST and assign unique names to every varRef.
static std::string varKeyTag
Tag to use to retrieve unique naming key from node.
UniqueNameTraversal(const std::vector< SgInitializedName * > &allNames, bool treatPointersAsStructs=true, bool propagateNamesThroughComma=true)
std::vector< SgInitializedName * > VarName
A compound variable name as used by the variable renaming.
virtual VariableReferenceSet evaluateSynthesizedAttribute(SgNode *node, SynthesizedAttributesList attrs)
Called to evaluate the synthesized attribute on every node.
Class holding a unique name for a variable.
std::string getNameString()
Get the string representing this uniqueName.
const std::vector< SgInitializedName * > & getKey()
Get a constant reference to the name.
VarUniqueName(const VarUniqueName &other)
Copy the attribute.
VarUniqueName * copy() const
Virtual copy constructor.
VarUniqueName()
Constructs the attribute with an empty key.
VarUniqueName(const std::vector< SgInitializedName * > &prefix, SgInitializedName *thisNode)
Constructs the attribute using the prefix vector and thisNode.
void setKey(const std::vector< SgInitializedName * > &newKey)
Set the value of the name.
VarUniqueName(SgInitializedName *thisNode)
Constructs the attribute with value thisNode.
Attribute that describes the variables modified by a given expression.
VariableReferenceSet()
Default constructor.