summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineCodeEmitter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-02 16:59:24 +0000
committerChris Lattner <sabre@nondot.org>2006-05-02 16:59:24 +0000
commitbb1c345ec63f517367e552e11a6db9e0a9fe1c3e (patch)
tree5d35dc6646d12c3b9269d1833e60ff1688bdf116 /llvm/lib/CodeGen/MachineCodeEmitter.cpp
parentb9d4f8324dc6b076b48d1583ea55d7c9c22407ad (diff)
downloadbcm5719-llvm-bb1c345ec63f517367e552e11a6db9e0a9fe1c3e.tar.gz
bcm5719-llvm-bb1c345ec63f517367e552e11a6db9e0a9fe1c3e.zip
Remove the debug machine code emitter. The "FilePrinterEmitter" is more
useful for debugging. llvm-svn: 28051
Diffstat (limited to 'llvm/lib/CodeGen/MachineCodeEmitter.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineCodeEmitter.cpp52
1 files changed, 0 insertions, 52 deletions
diff --git a/llvm/lib/CodeGen/MachineCodeEmitter.cpp b/llvm/lib/CodeGen/MachineCodeEmitter.cpp
index 4243076d3e5..a33552ca872 100644
--- a/llvm/lib/CodeGen/MachineCodeEmitter.cpp
+++ b/llvm/lib/CodeGen/MachineCodeEmitter.cpp
@@ -12,55 +12,12 @@
//===----------------------------------------------------------------------===//
#include "llvm/CodeGen/MachineCodeEmitter.h"
-#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/Function.h"
#include <fstream>
#include <iostream>
-#include <ios>
using namespace llvm;
namespace {
- struct DebugMachineCodeEmitter : public MachineCodeEmitter {
- void startFunction(MachineFunction &F) {
- std::cout << "\n**** Writing machine code for function: "
- << F.getFunction()->getName() << "\n";
- }
- void finishFunction(MachineFunction &F) {
- std::cout << "\n";
- }
- void startFunctionStub(unsigned StubSize) {
- std::cout << "\n--- Function stub:\n";
- }
- void *finishFunctionStub(const Function *F) {
- std::cout << "\n--- End of stub for Function\n";
- return 0;
- }
-
- void emitByte(unsigned char B) {
- std::cout << "0x" << std::hex << (unsigned int)B << std::dec << " ";
- }
- void emitWord(unsigned W) {
- std::cout << "0x" << std::hex << W << std::dec << " ";
- }
- void emitWordAt(unsigned W, unsigned *Ptr) {
- std::cout << "0x" << std::hex << W << std::dec << " (at "
- << (void*) Ptr << ") ";
- }
-
- void addRelocation(const MachineRelocation &MR) {
- std::cout << "<relocation> ";
- }
-
- virtual unsigned char* allocateGlobal(unsigned size, unsigned alignment)
- { return 0; }
-
- uint64_t getConstantPoolEntryAddress(unsigned Num) { return 0; }
- uint64_t getJumpTableEntryAddress(unsigned Num) { return 0; }
- uint64_t getCurrentPCValue() { return 0; }
- uint64_t getCurrentPCOffset() { return 0; }
- };
-
class FilePrinterEmitter : public MachineCodeEmitter {
std::ofstream actual;
std::ostream &o;
@@ -172,15 +129,6 @@ namespace {
};
}
-/// createDebugMachineCodeEmitter - Return a dynamically allocated machine
-/// code emitter, which just prints the opcodes and fields out the cout. This
-/// can be used for debugging users of the MachineCodeEmitter interface.
-///
-MachineCodeEmitter *
-MachineCodeEmitter::createDebugEmitter() {
- return new DebugMachineCodeEmitter();
-}
-
MachineCodeEmitter *
MachineCodeEmitter::createFilePrinterEmitter(MachineCodeEmitter &MCE) {
return new FilePrinterEmitter(MCE, std::cerr);
OpenPOWER on IntegriCloud