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

Unified Diff: src/PNaClTranslator.cpp

Issue 798693003: Subzero: Don't store std::string objects inside Variable. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 6 years 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
« src/IceOperand.h ('K') | « src/IceTargetLoweringX8632.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/PNaClTranslator.cpp
diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp
index 8f1f99dfaeaf9446d1f2799b1f28255837b5e519..639c0625a6bf02a9c16c3d87a15261fe588094aa 100644
--- a/src/PNaClTranslator.cpp
+++ b/src/PNaClTranslator.cpp
@@ -1086,8 +1086,6 @@ void ValuesymtabParser::ProcessRecord() {
return;
}
-class FunctionValuesymtabParser;
-
/// Parses function blocks in the bitcode file.
class FunctionParser : public BlockParserBaseClass {
FunctionParser(const FunctionParser &) = delete;
@@ -2663,8 +2661,10 @@ void FunctionValuesymtabParser::setValueName(uint64_t Index, StringType &Name) {
return;
Ice::Operand *Op = getFunctionParser()->getOperand(Index);
if (Ice::Variable *V = dyn_cast<Ice::Variable>(Op)) {
- std::string Nm(Name.data(), Name.size());
- V->setName(Nm);
+ if (ALLOW_DUMP) {
+ std::string Nm(Name.data(), Name.size());
+ V->setName(getFunctionParser()->getFunc(), Nm);
+ }
} else {
reportUnableToAssign("variable", Index, Name);
}
« src/IceOperand.h ('K') | « src/IceTargetLoweringX8632.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698