From fe0517cf6def80787311a95a7484fa7b144d4ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 19 Feb 2015 16:55:10 +0100 Subject: [PATCH] Workaround for printing extractvalue instruction in DOT language --- evmjit/libevmjit/BasicBlock.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/evmjit/libevmjit/BasicBlock.cpp b/evmjit/libevmjit/BasicBlock.cpp index c9e71be9a..0b7d2e0c4 100644 --- a/evmjit/libevmjit/BasicBlock.cpp +++ b/evmjit/libevmjit/BasicBlock.cpp @@ -340,6 +340,8 @@ void BasicBlock::dump(std::ostream& _out, bool _dotOutput) { if (val == nullptr) out << " ?"; + else if (llvm::isa(val)) + out << " " << val->getName(); else if (llvm::isa(val)) out << *val; else @@ -349,8 +351,8 @@ void BasicBlock::dump(std::ostream& _out, bool _dotOutput) } out << (_dotOutput ? "| " : "Instructions:\n"); - for (auto ins = m_llvmBB->begin(); ins != m_llvmBB->end(); ++ins) - out << *ins << (_dotOutput ? "\\l" : "\n"); + //for (auto ins = m_llvmBB->begin(); ins != m_llvmBB->end(); ++ins) + // out << *ins << (_dotOutput ? "\\l" : "\n"); if (! _dotOutput) out << "Current stack (offset = " << m_tosOffset << "):\n"; @@ -361,6 +363,8 @@ void BasicBlock::dump(std::ostream& _out, bool _dotOutput) { if (*val == nullptr) out << " ?"; + else if (llvm::isa(*val)) + out << " " << (*val)->getName(); else if (llvm::isa(*val)) out << **val; else