From b7050233fbb030d83377d0092a9bb940a2a2ea3b Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Tue, 26 Oct 2010 20:21:46 +0000 Subject: Teach MachineBasicBlock::print() to annotate instructions and blocks with SlotIndexes when available. llvm-svn: 117392 --- llvm/lib/CodeGen/MachineFunction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/MachineFunction.cpp') diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index f2f6227002fc..c32906904f70 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -280,7 +280,7 @@ void MachineFunction::dump() const { print(dbgs()); } -void MachineFunction::print(raw_ostream &OS) const { +void MachineFunction::print(raw_ostream &OS, SlotIndexes *Indexes) const { OS << "# Machine code for function " << Fn->getName() << ":\n"; // Print Frame Information @@ -329,7 +329,7 @@ void MachineFunction::print(raw_ostream &OS) const { for (const_iterator BB = begin(), E = end(); BB != E; ++BB) { OS << '\n'; - BB->print(OS); + BB->print(OS, Indexes); } OS << "\n# End machine code for function " << Fn->getName() << ".\n\n"; -- cgit v1.2.3