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

Unified Diff: src/IceInstMIPS32.cpp

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/IceInstMIPS32.cpp
diff --git a/src/IceInstMIPS32.cpp b/src/IceInstMIPS32.cpp
index dcd977df56d31b3d958d530b8a2da803f6c4374a..63cfc83c0eb1b8be3c1e5df391f278972e8acdf0 100644
--- a/src/IceInstMIPS32.cpp
+++ b/src/IceInstMIPS32.cpp
@@ -114,26 +114,28 @@ InstMIPS32Br::InstMIPS32Br(Cfg *Func, const CfgNode *TargetTrue,
InstMIPS32Label::InstMIPS32Label(Cfg *Func, TargetMIPS32 *Target)
: InstMIPS32(Func, InstMIPS32::Label, 0, nullptr),
- Number(Target->makeNextLabelNumber()) {}
-
-IceString InstMIPS32Label::getName(const Cfg *Func) const {
- if (!BuildDefs::dump())
- return "";
- return ".L" + Func->getFunctionName() + "$local$__" + std::to_string(Number);
+ Number(Target->makeNextLabelNumber()) {
+ if (BuildDefs::dump()) {
+ Name = GlobalString(Func->getContext(), ".L" + Func->getFunctionName() +
+ "$local$__" +
+ std::to_string(Number));
+ } else {
+ Name = GlobalString(Func->getContext());
+ }
}
void InstMIPS32Label::dump(const Cfg *Func) const {
if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
- Str << getName(Func) << ":";
+ Str << getLabelName() << ":";
}
void InstMIPS32Label::emit(const Cfg *Func) const {
if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
- Str << getName(Func) << ":";
+ Str << getLabelName() << ":";
}
void InstMIPS32Label::emitIAS(const Cfg *Func) const {
@@ -268,7 +270,7 @@ void InstMIPS32Br::emit(const Cfg *Func) const {
"b"
<< "\t";
if (Label) {
- Str << Label->getName(Func);
+ Str << Label->getLabelName();
} else {
if (isUnconditionalBranch()) {
Str << getTargetFalse()->getAsmName();

Powered by Google App Engine
This is Rietveld 408576698