Made a fix so that you can print out MachineInstrs that belong to a MachineBasicBlock that is not yet attached to a MachineFunction. This change includes changing the third operand (TargetMachine) to a pointer for the MachineInstr::print function.
llvm-svn: 14389
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index 462c562..f4ef3ee 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -105,6 +105,6 @@
<< ", LLVM BB @" << (const void*) LBB << "):\n";
for (const_iterator I = begin(); I != end(); ++I) {
OS << "\t";
- I->print(OS, getParent()->getTarget());
+ I->print(OS, &getParent()->getTarget());
}
}