diff options
author | Chris Lattner <sabre@nondot.org> | 2005-07-11 05:17:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-07-11 05:17:48 +0000 |
commit | d831209c3490614b7b33dec0cc524691fda6ba83 (patch) | |
tree | 302ac89c8350fd9309d48c15dbb73ea75d619e67 /llvm/lib/Target/X86/X86TargetMachine.cpp | |
parent | 2244f73437db1532f1d1c389734fa2c4acbc85d9 (diff) | |
download | bcm5719-llvm-d831209c3490614b7b33dec0cc524691fda6ba83.tar.gz bcm5719-llvm-d831209c3490614b7b33dec0cc524691fda6ba83.zip |
Refactor things a bit to allow the ELF code emitter to run the X86 machine code emitter
after itself.
llvm-svn: 22376
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86TargetMachine.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp index def4f9cfa49..a0537f529c1 100644 --- a/llvm/lib/Target/X86/X86TargetMachine.cpp +++ b/llvm/lib/Target/X86/X86TargetMachine.cpp @@ -162,7 +162,7 @@ bool X86TargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out, // FIXME: We only support emission of ELF files for now, this should check // the target triple and decide on the format to write (e.g. COFF on // win32). - PM.add(createX86ELFObjectWriterPass(Out, *this)); + addX86ELFObjectWriterPass(PM, Out, *this); break; } @@ -225,3 +225,10 @@ void X86JITInfo::addPassesToJITCompile(FunctionPassManager &PM) { PM.add(createX86CodePrinterPass(std::cerr, TM)); } +bool X86TargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM, + MachineCodeEmitter &MCE) { + PM.add(createX86CodeEmitterPass(MCE)); + // Delete machine code for this function + PM.add(createMachineCodeDeleter()); + return false; +} |