[llvm-commits] CVS: llvm/lib/Target/X86/X86TargetMachine.cpp X86TargetMachine.h

Chris Lattner lattner at cs.uiuc.edu
Fri Jun 24 19:48:50 PDT 2005



Changes in directory llvm/lib/Target/X86:

X86TargetMachine.cpp updated: 1.78 -> 1.79
X86TargetMachine.h updated: 1.27 -> 1.28
---
Log message:

Refactor the addPassesToEmitAssembly interface into a addPassesToEmitFile
interface.


---
Diffs of the changes:  (+7 -4)

 X86TargetMachine.cpp |    8 +++++---
 X86TargetMachine.h   |    3 ++-
 2 files changed, 7 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/X86/X86TargetMachine.cpp
diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.78 llvm/lib/Target/X86/X86TargetMachine.cpp:1.79
--- llvm/lib/Target/X86/X86TargetMachine.cpp:1.78	Thu May 12 14:56:09 2005
+++ llvm/lib/Target/X86/X86TargetMachine.cpp	Fri Jun 24 21:48:37 2005
@@ -94,10 +94,12 @@
 }
 
 
-// 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());
 


Index: llvm/lib/Target/X86/X86TargetMachine.h
diff -u llvm/lib/Target/X86/X86TargetMachine.h:1.27 llvm/lib/Target/X86/X86TargetMachine.h:1.28
--- llvm/lib/Target/X86/X86TargetMachine.h:1.27	Thu Apr 21 18:38:14 2005
+++ llvm/lib/Target/X86/X86TargetMachine.h	Fri Jun 24 21:48:37 2005
@@ -46,7 +46,8 @@
   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();






More information about the llvm-commits mailing list