Index: src/IceOperand.cpp |
diff --git a/src/IceOperand.cpp b/src/IceOperand.cpp |
index b718ba50f445c15e801e3517d674022de3bf7e96..1f232dd61a39b2a1332b6ee5eaced5b11271d317 100644 |
--- a/src/IceOperand.cpp |
+++ b/src/IceOperand.cpp |
@@ -201,8 +201,11 @@ void Variable::emit(const Cfg *Func) const { |
Func->getTarget()->emitVariable(this, Func); |
} |
-void Variable::dump(const Cfg *Func) const { |
- Ostream &Str = Func->getContext()->getStrDump(); |
+void Variable::dump(const Cfg *Func, Ostream &Str) const { |
+ if (Func == NULL) { |
+ Str << "%" << getName(); |
+ return; |
+ } |
const CfgNode *CurrentNode = Func->getCurrentNode(); |
(void)CurrentNode; // used only in assert() |
assert(CurrentNode == NULL || DefNode == NULL || DefNode == CurrentNode); |
@@ -241,8 +244,7 @@ void ConstantRelocatable::emit(GlobalContext *Ctx) const { |
} |
} |
-void ConstantRelocatable::dump(GlobalContext *Ctx) const { |
- Ostream &Str = Ctx->getStrDump(); |
+void ConstantRelocatable::dump(const Cfg *, Ostream &Str) const { |
Str << "@" << Name; |
if (Offset) |
Str << "+" << Offset; |