diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/Dump.cpp | 18 | ||||
-rw-r--r-- | lib/CodeGen/MachineBasicBlock.cpp | 10 | ||||
-rw-r--r-- | lib/CodeGen/MachineFunction.cpp | 13 |
3 files changed, 9 insertions, 32 deletions
diff --git a/lib/CodeGen/Dump.cpp b/lib/CodeGen/Dump.cpp deleted file mode 100644 index 2e70d5f25e..0000000000 --- a/lib/CodeGen/Dump.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//===- lib/Support/Dump.h - Virtual function homes --------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file provides the PrefixPrinter virtual function homes. -// -//===----------------------------------------------------------------------===// - -#include "llvm/CodeGen/Dump.h" - -using namespace llvm; - -PrefixPrinter::~PrefixPrinter() {} diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp index 777aa85c4c..7ec9aab8c2 100644 --- a/lib/CodeGen/MachineBasicBlock.cpp +++ b/lib/CodeGen/MachineBasicBlock.cpp @@ -173,14 +173,12 @@ static inline void OutputReg(raw_ostream &os, unsigned RegNo, os << " %reg" << RegNo; } -void MachineBasicBlock::print(std::ostream &OS, - const PrefixPrinter &prefix) const { +void MachineBasicBlock::print(std::ostream &OS) const { raw_os_ostream RawOS(OS); - print(RawOS, prefix); + print(RawOS); } -void MachineBasicBlock::print(raw_ostream &OS, - const PrefixPrinter &prefix) const { +void MachineBasicBlock::print(raw_ostream &OS) const { const MachineFunction *MF = getParent(); if (!MF) { OS << "Can't print out MachineBasicBlock because parent MachineFunction" @@ -213,7 +211,7 @@ void MachineBasicBlock::print(raw_ostream &OS, } for (const_iterator I = begin(); I != end(); ++I) { - prefix(OS, *I) << '\t'; + OS << '\t'; I->print(OS, &getParent()->getTarget()); } diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 340f12f7e5..93a8feeea7 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -220,9 +220,8 @@ void MachineFunction::dump() const { print(*cerr.stream()); } -void MachineFunction::print(std::ostream &OS, - const PrefixPrinter &prefix) const { - OS << "# Machine code for " << Fn->getNameStr () << "():\n"; +void MachineFunction::print(std::ostream &OS) const { + OS << "# Machine code for " << Fn->getNameStr() << "():\n"; // Print Frame Information FrameInfo->print(*this, OS); @@ -263,12 +262,10 @@ void MachineFunction::print(std::ostream &OS, OS << "\n"; } - for (const_iterator BB = begin(); BB != end(); ++BB) { - prefix(OS, *BB); - BB->print(OS, prefix); - } + for (const_iterator BB = begin(), E = end(); BB != E; ++BB) + BB->print(OS); - OS << "\n# End machine code for " << Fn->getNameStr () << "().\n\n"; + OS << "\n# End machine code for " << Fn->getNameStr() << "().\n\n"; } namespace llvm { |