1 //===-- X86/Printer.cpp - Convert X86 code to human readable rep. ---------===//
3 // This file contains a printer that converts from our internal representation
4 // of LLVM code to a nice human readable form that is suitable for debuggging.
6 //===----------------------------------------------------------------------===//
10 #include "llvm/CodeGen/MachineFunction.h"
14 struct Printer : public FunctionPass {
18 Printer(TargetMachine &tm, std::ostream &o) : TM(tm), O(o) {}
20 bool runOnFunction(Function &F);
24 bool Printer::runOnFunction(Function &F) {
25 MachineFunction &MF = MachineFunction::get(&F);
26 O << "x86 printing not implemented yet!\n";
28 // This should use the X86InstructionInfo::print method to print assembly
29 // for each instruction
36 /// createX86CodePrinterPass - Print out the specified machine code function to
37 /// the specified stream. This function should work regardless of whether or
38 /// not the function is in SSA form or not.
40 Pass *createX86CodePrinterPass(TargetMachine &TM, std::ostream &O) {
41 return new Printer(TM, O);