Refactor the addPassesToEmitAssembly interface into a addPassesToEmitFile
[oota-llvm.git] / lib / Target / PowerPC / PPCTargetMachine.cpp
index b4f6fa497fbb901fd8adfd2d8068e43ef546d539..3232b9e613448e61b8fe3778121aa99fe5b3312c 100644 (file)
@@ -73,11 +73,14 @@ unsigned PPC32TargetMachine::getJITMatchQuality() {
 #endif
 }
 
-/// addPassesToEmitAssembly - Add passes to the specified pass manager
-/// to implement a static compiler for this target.
+/// addPassesToEmitFile - Add passes to the specified pass manager to implement
+/// a static compiler for this target.
 ///
-bool PowerPCTargetMachine::addPassesToEmitAssembly(PassManager &PM,
-                                                   std::ostream &Out) {
+bool PowerPCTargetMachine::addPassesToEmitFile(PassManager &PM,
+                                               std::ostream &Out,
+                                                CodeGenFileType FileType) {
+  if (FileType != TargetMachine::AssemblyFile) return true;
+
   bool LP64 = (0 != dynamic_cast<PPC64TargetMachine *>(this));
 
   if (EnablePPCLSR) {