Index: src/IceOperand.h |
diff --git a/src/IceOperand.h b/src/IceOperand.h |
index 0828396074cffa8836ce8601f1090275b14e923b..36aafe23249f3a198b52b3e903fb4f3f36b151da 100644 |
--- a/src/IceOperand.h |
+++ b/src/IceOperand.h |
@@ -335,6 +335,11 @@ public: |
SizeT getIndex() const { return Number; } |
IceString getName() const; |
+ void setName(IceString &NewName) { |
+ // Make sure that the name can only be set once. |
+ assert(Name.empty()); |
+ Name = NewName; |
+ } |
Inst *getDefinition() const { return DefInst; } |
void setDefinition(Inst *Inst, const CfgNode *Node); |
@@ -427,7 +432,7 @@ private: |
// (bit)vector index for liveness analysis. |
const SizeT Number; |
// Name is optional. |
- const IceString Name; |
+ IceString Name; |
// DefInst is the instruction that produces this variable as its |
// dest. |
Inst *DefInst; |