aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/X86CodeEmitter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-07-11 05:17:48 +0000
committerChris Lattner <sabre@nondot.org>2005-07-11 05:17:48 +0000
commit81b6ed7ed1dbf1e5cc001aaff2dee5bdd8d1122e (patch)
treeebc2d846265d53e190d04116ca3a2898c0a9b6bd /lib/Target/X86/X86CodeEmitter.cpp
parentaa507db59e085b1a6c728c2becef76e6dd9ab03a (diff)
downloadexternal_llvm-81b6ed7ed1dbf1e5cc001aaff2dee5bdd8d1122e.tar.gz
external_llvm-81b6ed7ed1dbf1e5cc001aaff2dee5bdd8d1122e.tar.bz2
external_llvm-81b6ed7ed1dbf1e5cc001aaff2dee5bdd8d1122e.zip
Refactor things a bit to allow the ELF code emitter to run the X86 machine code emitter
after itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22376 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86CodeEmitter.cpp')
-rw-r--r--lib/Target/X86/X86CodeEmitter.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/Target/X86/X86CodeEmitter.cpp b/lib/Target/X86/X86CodeEmitter.cpp
index 789b8e26ce..cafb175c52 100644
--- a/lib/Target/X86/X86CodeEmitter.cpp
+++ b/lib/Target/X86/X86CodeEmitter.cpp
@@ -68,18 +68,10 @@ namespace {
};
}
-/// 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(FunctionPassManager &PM,
- MachineCodeEmitter &MCE) {
- PM.add(new Emitter(MCE));
- // Delete machine code for this function
- PM.add(createMachineCodeDeleter());
- return false;
+/// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
+/// to the specified MCE object.
+FunctionPass *llvm::createX86CodeEmitterPass(MachineCodeEmitter &MCE) {
+ return new Emitter(MCE);
}
bool Emitter::runOnMachineFunction(MachineFunction &MF) {