summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2009-07-21 18:27:05 +0000
committerDavid Greene <greened@obbligato.org>2009-07-21 18:27:05 +0000
commit3b458645be949b8e65702c711bb590d1a92fd097 (patch)
tree78bb5a0b99f46ce62792d0dee94e9e76bca82eea /llvm/lib/CodeGen/MachineFunction.cpp
parent92ebf9dd6eca31e4c6b8b380fbdaa30736098d9e (diff)
downloadbcm5719-llvm-3b458645be949b8e65702c711bb590d1a92fd097.tar.gz
bcm5719-llvm-3b458645be949b8e65702c711bb590d1a92fd097.zip
Add PrefixPrinter arguments to the dump routines for MachineFunction and
MachineBasicBlock. We'll use these shortly. llvm-svn: 76603
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 599efb8bd27..324e3a5b921 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -252,7 +252,8 @@ void MachineFunction::dump() const {
print(*cerr.stream());
}
-void MachineFunction::print(std::ostream &OS) const {
+void MachineFunction::print(std::ostream &OS,
+ const PrefixPrinter &prefix) const {
OS << "# Machine code for " << Fn->getName () << "():\n";
// Print Frame Information
@@ -294,8 +295,10 @@ void MachineFunction::print(std::ostream &OS) const {
OS << "\n";
}
- for (const_iterator BB = begin(); BB != end(); ++BB)
- BB->print(OS);
+ for (const_iterator BB = begin(); BB != end(); ++BB) {
+ OS << prefix(*BB);
+ BB->print(OS, prefix);
+ }
OS << "\n# End machine code for " << Fn->getName () << "().\n\n";
}
OpenPOWER on IntegriCloud