diff options
Diffstat (limited to 'llvm/lib/Target/X86')
| -rw-r--r-- | llvm/lib/Target/X86/X86TargetMachine.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86TargetMachine.h | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp index fd5bcb268e3..dcf27ac1750 100644 --- a/llvm/lib/Target/X86/X86TargetMachine.cpp +++ b/llvm/lib/Target/X86/X86TargetMachine.cpp @@ -94,10 +94,12 @@ X86TargetMachine::X86TargetMachine(const Module &M, IntrinsicLowering *IL) } -// addPassesToEmitAssembly - We currently use all of the same passes as the JIT +// addPassesToEmitFile - We currently use all of the same passes as the JIT // does to emit statically compiled machine code. -bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM, - std::ostream &Out) { +bool X86TargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out, + CodeGenFileType FileType) { + if (FileType != TargetMachine::AssemblyFile) return true; + // FIXME: Implement efficient support for garbage collection intrinsics. PM.add(createLowerGCPass()); diff --git a/llvm/lib/Target/X86/X86TargetMachine.h b/llvm/lib/Target/X86/X86TargetMachine.h index 60e782a0d65..70b111c38bf 100644 --- a/llvm/lib/Target/X86/X86TargetMachine.h +++ b/llvm/lib/Target/X86/X86TargetMachine.h @@ -46,7 +46,8 @@ public: virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM, MachineCodeEmitter &MCE); - virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out); + virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out, + CodeGenFileType FileType); static unsigned getModuleMatchQuality(const Module &M); static unsigned getJITMatchQuality(); |

