mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-24 08:33:39 +00:00
40ead95928
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4866 91177308-0d34-0410-b5e6-96231b3b80d8
37 lines
1.2 KiB
C++
37 lines
1.2 KiB
C++
//===-- X86/MachineCodeEmitter.cpp - Convert X86 code to machine code -----===//
|
|
//
|
|
// This file contains the pass that transforms the X86 machine instructions into
|
|
// actual executable machine code.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "X86TargetMachine.h"
|
|
#include "llvm/PassManager.h"
|
|
#include "llvm/CodeGen/MachineCodeEmitter.h"
|
|
|
|
namespace {
|
|
struct Emitter : public FunctionPass {
|
|
TargetMachine &TM;
|
|
MachineCodeEmitter &MCE;
|
|
|
|
Emitter(TargetMachine &tm, MachineCodeEmitter &mce) : TM(tm), MCE(mce) {}
|
|
~Emitter() {
|
|
}
|
|
|
|
bool runOnFunction(Function &F) { return false; }
|
|
};
|
|
}
|
|
|
|
|
|
/// addPassesToEmitMachineCode - Add passes to the specified pass manager to get
|
|
/// machine code emitted. This uses a MAchineCodeEmitter object to handle
|
|
/// actually outputting the machine code and resolving things like the address
|
|
/// of functions. This method should returns true if machine code emission is
|
|
/// not supported.
|
|
///
|
|
bool X86TargetMachine::addPassesToEmitMachineCode(PassManager &PM,
|
|
MachineCodeEmitter &MCE) {
|
|
PM.add(new Emitter(*this, MCE));
|
|
return false;
|
|
}
|