Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: src/IceOperand.h

Issue 561823002: Fix symbol table handling in functions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix issues in patch set 2 raised by Jim. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceCfgNode.h ('k') | src/PNaClTranslator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/IceCfgNode.h ('k') | src/PNaClTranslator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698