mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
remove dead PrefixPrinter class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79796 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
77942d4ee4
commit
2d8e3d20be
@ -1,60 +0,0 @@
|
|||||||
//===- llvm/Support/Dump.h - Easy way to tailor dump output -----*- 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 interface to pass to MachineFunction
|
|
||||||
// and MachineBasicBlock print methods to output additional information before
|
|
||||||
// blocks and instructions are printed.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
|
|
||||||
#ifndef LLVM_CODEGEN_DUMP_H
|
|
||||||
#define LLVM_CODEGEN_DUMP_H
|
|
||||||
|
|
||||||
#include <iosfwd>
|
|
||||||
|
|
||||||
namespace llvm {
|
|
||||||
|
|
||||||
class MachineBasicBlock;
|
|
||||||
class MachineInstr;
|
|
||||||
class raw_ostream;
|
|
||||||
|
|
||||||
/// PrefixPrinter - Print some additional information before printing
|
|
||||||
/// basic blocks and instructions.
|
|
||||||
class PrefixPrinter {
|
|
||||||
public:
|
|
||||||
virtual ~PrefixPrinter();
|
|
||||||
|
|
||||||
/// operator() - Print a prefix before each MachineBasicBlock
|
|
||||||
virtual raw_ostream &operator()(raw_ostream &out,
|
|
||||||
const MachineBasicBlock &) const {
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// operator() - Print a prefix before each MachineInstr
|
|
||||||
virtual raw_ostream &operator()(raw_ostream &out,
|
|
||||||
const MachineInstr &) const {
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// operator() - Print a prefix before each MachineBasicBlock
|
|
||||||
virtual std::ostream &operator()(std::ostream &out,
|
|
||||||
const MachineBasicBlock &) const {
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// operator() - Print a prefix before each MachineInstr
|
|
||||||
virtual std::ostream &operator()(std::ostream &out,
|
|
||||||
const MachineInstr &) const {
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
} // End llvm namespace
|
|
||||||
|
|
||||||
#endif
|
|
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/ADT/GraphTraits.h"
|
#include "llvm/ADT/GraphTraits.h"
|
||||||
#include "llvm/CodeGen/Dump.h"
|
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
@ -311,17 +310,13 @@ public:
|
|||||||
|
|
||||||
// Debugging methods.
|
// Debugging methods.
|
||||||
void dump() const;
|
void dump() const;
|
||||||
void print(std::ostream &OS,
|
void print(std::ostream &OS) const;
|
||||||
const PrefixPrinter &prefix = PrefixPrinter()) const;
|
void print(std::ostream *OS) const {
|
||||||
void print(std::ostream *OS,
|
if (OS) print(*OS);
|
||||||
const PrefixPrinter &prefix = PrefixPrinter()) const {
|
|
||||||
if (OS) print(*OS, prefix);
|
|
||||||
}
|
}
|
||||||
void print(raw_ostream &OS,
|
void print(raw_ostream &OS) const;
|
||||||
const PrefixPrinter &prefix = PrefixPrinter()) const;
|
void print(raw_ostream *OS) const {
|
||||||
void print(raw_ostream *OS,
|
if (OS) print(*OS);
|
||||||
const PrefixPrinter &prefix = PrefixPrinter()) const {
|
|
||||||
if (OS) print(*OS, prefix);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getNumber - MachineBasicBlocks are uniquely numbered at the function
|
/// getNumber - MachineBasicBlocks are uniquely numbered at the function
|
||||||
|
@ -18,13 +18,12 @@
|
|||||||
#ifndef LLVM_CODEGEN_MACHINEFUNCTION_H
|
#ifndef LLVM_CODEGEN_MACHINEFUNCTION_H
|
||||||
#define LLVM_CODEGEN_MACHINEFUNCTION_H
|
#define LLVM_CODEGEN_MACHINEFUNCTION_H
|
||||||
|
|
||||||
#include <map>
|
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||||
#include "llvm/ADT/ilist.h"
|
#include "llvm/ADT/ilist.h"
|
||||||
#include "llvm/Support/DebugLoc.h"
|
#include "llvm/Support/DebugLoc.h"
|
||||||
#include "llvm/CodeGen/Dump.h"
|
|
||||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
|
||||||
#include "llvm/Support/Allocator.h"
|
#include "llvm/Support/Allocator.h"
|
||||||
#include "llvm/Support/Recycler.h"
|
#include "llvm/Support/Recycler.h"
|
||||||
|
#include <map>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
@ -208,11 +207,9 @@ public:
|
|||||||
/// print - Print out the MachineFunction in a format suitable for debugging
|
/// print - Print out the MachineFunction in a format suitable for debugging
|
||||||
/// to the specified stream.
|
/// to the specified stream.
|
||||||
///
|
///
|
||||||
void print(std::ostream &OS,
|
void print(std::ostream &OS) const;
|
||||||
const PrefixPrinter &prefix = PrefixPrinter()) const;
|
void print(std::ostream *OS) const {
|
||||||
void print(std::ostream *OS,
|
if (OS) print(*OS);
|
||||||
const PrefixPrinter &prefix = PrefixPrinter()) const {
|
|
||||||
if (OS) print(*OS, prefix);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// viewCFG - This function is meant for use from the debugger. You can just
|
/// viewCFG - This function is meant for use from the debugger. You can just
|
||||||
|
@ -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() {}
|
|
@ -173,14 +173,12 @@ static inline void OutputReg(raw_ostream &os, unsigned RegNo,
|
|||||||
os << " %reg" << RegNo;
|
os << " %reg" << RegNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MachineBasicBlock::print(std::ostream &OS,
|
void MachineBasicBlock::print(std::ostream &OS) const {
|
||||||
const PrefixPrinter &prefix) const {
|
|
||||||
raw_os_ostream RawOS(OS);
|
raw_os_ostream RawOS(OS);
|
||||||
print(RawOS, prefix);
|
print(RawOS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MachineBasicBlock::print(raw_ostream &OS,
|
void MachineBasicBlock::print(raw_ostream &OS) const {
|
||||||
const PrefixPrinter &prefix) const {
|
|
||||||
const MachineFunction *MF = getParent();
|
const MachineFunction *MF = getParent();
|
||||||
if (!MF) {
|
if (!MF) {
|
||||||
OS << "Can't print out MachineBasicBlock because parent MachineFunction"
|
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) {
|
for (const_iterator I = begin(); I != end(); ++I) {
|
||||||
prefix(OS, *I) << '\t';
|
OS << '\t';
|
||||||
I->print(OS, &getParent()->getTarget());
|
I->print(OS, &getParent()->getTarget());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,8 +220,7 @@ void MachineFunction::dump() const {
|
|||||||
print(*cerr.stream());
|
print(*cerr.stream());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MachineFunction::print(std::ostream &OS,
|
void MachineFunction::print(std::ostream &OS) const {
|
||||||
const PrefixPrinter &prefix) const {
|
|
||||||
OS << "# Machine code for " << Fn->getNameStr() << "():\n";
|
OS << "# Machine code for " << Fn->getNameStr() << "():\n";
|
||||||
|
|
||||||
// Print Frame Information
|
// Print Frame Information
|
||||||
@ -263,10 +262,8 @@ void MachineFunction::print(std::ostream &OS,
|
|||||||
OS << "\n";
|
OS << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const_iterator BB = begin(); BB != end(); ++BB) {
|
for (const_iterator BB = begin(), E = end(); BB != E; ++BB)
|
||||||
prefix(OS, *BB);
|
BB->print(OS);
|
||||||
BB->print(OS, prefix);
|
|
||||||
}
|
|
||||||
|
|
||||||
OS << "\n# End machine code for " << Fn->getNameStr() << "().\n\n";
|
OS << "\n# End machine code for " << Fn->getNameStr() << "().\n\n";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user