aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-13 10:30:59 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-13 10:30:59 +0000
commitb41dbbe32582dcfe18e6ea763886fabf5fd7c84d (patch)
tree5c8b1ce5df3a97533818dcd4d340c1ee09265c13 /llvm/lib/CodeGen/MachineFunction.cpp
parentb3a0d513749623b8ee51183c127be74350052426 (diff)
downloadllvm-b41dbbe32582dcfe18e6ea763886fabf5fd7c84d.zip
llvm-b41dbbe32582dcfe18e6ea763886fabf5fd7c84d.tar.gz
llvm-b41dbbe32582dcfe18e6ea763886fabf5fd7c84d.tar.bz2
[CodeGen] Print jump-table index operands as %jump-table.0 in both MIR and debug output
Work towards the unification of MIR and debug output by printing `%jump-table.0` instead of `<jt#0>`. Only debug syntax is affected. llvm-svn: 320566
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index f0d5eec..dba0dfb 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -906,7 +906,7 @@ void MachineJumpTableInfo::print(raw_ostream &OS) const {
OS << "Jump Tables:\n";
for (unsigned i = 0, e = JumpTables.size(); i != e; ++i) {
- OS << " jt#" << i << ": ";
+ OS << printJumpTableEntryReference(i) << ": ";
for (unsigned j = 0, f = JumpTables[i].MBBs.size(); j != f; ++j)
OS << ' ' << printMBBReference(*JumpTables[i].MBBs[j]);
}
@@ -918,6 +918,10 @@ void MachineJumpTableInfo::print(raw_ostream &OS) const {
LLVM_DUMP_METHOD void MachineJumpTableInfo::dump() const { print(dbgs()); }
#endif
+Printable llvm::printJumpTableEntryReference(unsigned Idx) {
+ return Printable([Idx](raw_ostream &OS) { OS << "%jump-table." << Idx; });
+}
+
//===----------------------------------------------------------------------===//
// MachineConstantPool implementation
//===----------------------------------------------------------------------===//