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

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: Cleanup 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
Index: src/IceInst.h
diff --git a/src/IceInst.h b/src/IceInst.h
index 6c62d0bcaff73ee9cd55b24d05d869dbd2252bec..6446e31ea34b476c847e414e3c72d9c6bb164ee4 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.hasString())
+ return ".L" + FuncName + "$jumptable$__" + std::to_string(Id);
+ return ".L" + std::to_string(FuncName.getID()) + "_" + std::to_string(Id);
}
private:

Powered by Google App Engine
This is Rietveld 408576698