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

Unified Diff: src/IceInst.h

Issue 1838753002: Subzero: Remove IceString. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 years, 9 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/IceGlobalInits.cpp ('k') | src/IceInst.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInst.h
diff --git a/src/IceInst.h b/src/IceInst.h
index 6c62d0bcaff73ee9cd55b24d05d869dbd2252bec..4fb74ae93d58010a513793bc44fa644bdd642900 100644
--- a/src/IceInst.h
+++ b/src/IceInst.h
@@ -76,7 +76,7 @@ public:
};
static_assert(Target <= Target_Max, "Must not be above max.");
InstKind getKind() const { return Kind; }
- virtual IceString getInstName() const;
+ virtual const char *getInstName() const;
InstNumberT getNumber() const { return Number; }
void renumber(Cfg *Func);
@@ -290,7 +290,7 @@ public:
}
OpKind getOp() const { return Op; }
- virtual IceString getInstName() const override;
+ virtual const char *getInstName() const override;
static const char *getOpName(OpKind Op);
bool isCommutative() const;
@@ -942,8 +942,11 @@ public:
return Instr->getKind() == JumpTable;
}
- static IceString makeName(const IceString &FuncName, SizeT Id) {
- return ".L" + FuncName + "$jumptable$__" + std::to_string(Id);
+ // TODO(stichnot): Should this create&save GlobalString values?
+ static std::string makeName(GlobalString FuncName, SizeT Id) {
+ if (FuncName.hasStdString())
+ return ".L" + FuncName + "$jumptable$__" + std::to_string(Id);
+ return ".L" + std::to_string(FuncName.getID()) + "_" + std::to_string(Id);
}
private:
« no previous file with comments | « src/IceGlobalInits.cpp ('k') | src/IceInst.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698