[llvm-commits] CVS: llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp SparcV8TargetMachine.h

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



Changes in directory llvm/lib/Target/SparcV8:

SparcV8TargetMachine.cpp updated: 1.27 -> 1.28
SparcV8TargetMachine.h updated: 1.5 -> 1.6
---
Log message:

Refactor the addPassesToEmitAssembly interface into a addPassesToEmitFile
interface.


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

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


Index: llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp
diff -u llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp:1.27 llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp:1.28
--- llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp:1.27	Fri Apr 22 13:06:01 2005
+++ llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp	Fri Jun 24 21:48:37 2005
@@ -59,11 +59,14 @@
   return getJITMatchQuality()/2;
 }
 
-/// addPassesToEmitAssembly - Add passes to the specified pass manager
+/// addPassesToEmitFile - Add passes to the specified pass manager
 /// to implement a static compiler for this target.
 ///
-bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &PM,
-                                                   std::ostream &Out) {
+bool SparcV8TargetMachine::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/SparcV8/SparcV8TargetMachine.h
diff -u llvm/lib/Target/SparcV8/SparcV8TargetMachine.h:1.5 llvm/lib/Target/SparcV8/SparcV8TargetMachine.h:1.6
--- llvm/lib/Target/SparcV8/SparcV8TargetMachine.h:1.5	Thu Apr 21 18:21:30 2005
+++ llvm/lib/Target/SparcV8/SparcV8TargetMachine.h	Fri Jun 24 21:48:37 2005
@@ -53,7 +53,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);
 };
 
 } // end namespace llvm






More information about the llvm-commits mailing list