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

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: 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/IceInstMIPS32.h ('k') | src/IceInstX8664.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstMIPS32.cpp
diff --git a/src/IceInstMIPS32.cpp b/src/IceInstMIPS32.cpp
index dcd977df56d31b3d958d530b8a2da803f6c4374a..1b0ab4c16e7fa730fe4025779e6b1e5753f3549a 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::createWithString(
+ Func->getContext(),
+ ".L" + Func->getFunctionName() + "$local$__" + std::to_string(Number));
+ } else {
+ Name = GlobalString::createWithoutString(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();
« no previous file with comments | « src/IceInstMIPS32.h ('k') | src/IceInstX8664.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698