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

Unified Diff: src/IceInstX8632.h

Issue 570713006: Subzero: Refactor Operand::dump(). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Use a more general dump function Created 6 years, 3 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 | « no previous file | src/IceInstX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstX8632.h
diff --git a/src/IceInstX8632.h b/src/IceInstX8632.h
index 918b77411dd90e52fba975320db678253832f463..ed538f49b33dbacb0b0d46b8306dcfc22dde838a 100644
--- a/src/IceInstX8632.h
+++ b/src/IceInstX8632.h
@@ -35,7 +35,10 @@ public:
kSplit
};
virtual void emit(const Cfg *Func) const = 0;
- void dump(const Cfg *Func) const;
+ using Operand::dump;
+ virtual void dump(const Cfg *, Ostream &Str) const {
+ Str << "<OperandX8632>";
+ }
protected:
OperandX8632(OperandKindX8632 Kind, Type Ty)
@@ -72,7 +75,8 @@ public:
uint16_t getShift() const { return Shift; }
SegmentRegisters getSegmentRegister() const { return SegmentReg; }
virtual void emit(const Cfg *Func) const;
- virtual void dump(const Cfg *Func) const;
+ using OperandX8632::dump;
+ virtual void dump(const Cfg *Func, Ostream &Str) const;
static bool classof(const Operand *Operand) {
return Operand->getKind() == static_cast<OperandKind>(kMem);
@@ -107,7 +111,8 @@ public:
return new (Func->allocate<VariableSplit>()) VariableSplit(Func, Var, Part);
}
virtual void emit(const Cfg *Func) const;
- virtual void dump(const Cfg *Func) const;
+ using OperandX8632::dump;
+ virtual void dump(const Cfg *Func, Ostream &Str) const;
static bool classof(const Operand *Operand) {
return Operand->getKind() == static_cast<OperandKind>(kSplit);
« no previous file with comments | « no previous file | src/IceInstX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698