Refactor the addPassesToEmitAssembly interface into a addPassesToEmitFile
[oota-llvm.git] / lib / Target / SparcV8 / SparcV8TargetMachine.cpp
index 21f86a080a8c5ac8f7e57f1349b921aedfd80892..75c095c7a50d579963cd595622f1f3215f9630d9 100644 (file)
@@ -59,11 +59,14 @@ unsigned SparcV8TargetMachine::getModuleMatchQuality(const Module &M) {
   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());