mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Refactor MachineFunction::print() into MachineBasicBlock::print().
Add MachineBasicBlock::dump(). llvm-svn: 11364
This commit is contained in:
parent
44cc73b6f2
commit
4f4348e113
@ -94,17 +94,21 @@ void MachineFunction::print(std::ostream &OS) const {
|
||||
// Print Constant Pool
|
||||
getConstantPool()->print(OS);
|
||||
|
||||
for (const_iterator BB = begin(); BB != end(); ++BB) {
|
||||
const BasicBlock *LBB = BB->getBasicBlock();
|
||||
OS << "\n" << LBB->getName() << " (" << (const void*)LBB << "):\n";
|
||||
for (MachineBasicBlock::const_iterator I = BB->begin(); I != BB->end();++I){
|
||||
OS << "\t";
|
||||
I->print(OS, Target);
|
||||
}
|
||||
}
|
||||
for (const_iterator BB = begin(); BB != end(); ++BB)
|
||||
BB->print(OS);
|
||||
OS << "\nEnd function \"" << Fn->getName() << "\"\n\n";
|
||||
}
|
||||
|
||||
void MachineBasicBlock::dump() const { print(std::cerr); }
|
||||
|
||||
void MachineBasicBlock::print(std::ostream &OS) const {
|
||||
const BasicBlock *LBB = getBasicBlock();
|
||||
OS << "\n" << LBB->getName() << " (" << (const void*)LBB << "):\n";
|
||||
for (const_iterator I = begin(); I != end(); ++I) {
|
||||
OS << "\t";
|
||||
I->print(OS, MachineFunction::get(LBB->getParent()).getTarget());
|
||||
}
|
||||
}
|
||||
|
||||
// The next two methods are used to construct and to retrieve
|
||||
// the MachineCodeForFunction object for the given function.
|
||||
|
Loading…
Reference in New Issue
Block a user