Switch MSP430, SPU, Sparc, and SystemZ to use EmitFunctionBody().

Diffstat:
 6 files changed, 30 insertions(+), 284 deletions(-)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94727 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
index 8285a41..7d67e83 100644
--- a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
+++ b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
@@ -74,7 +74,6 @@
     void printHex32(unsigned int Value);
 
     const char *emitCurrentABIString();
-    void emitFunctionEnd(MachineFunction &MF);
     void emitFrameDirective(MachineFunction &MF);
 
     void printInstruction(const MachineInstr *MI);  // autogenerated.
@@ -207,19 +206,6 @@
   return NULL;
 }  
 
-/// Emit the directives used by GAS on the end of functions
-void MipsAsmPrinter::emitFunctionEnd(MachineFunction &MF) {
-  // There are instruction for this macros, but they must
-  // always be at the function end, and we can't emit and
-  // break with BB logic. 
-  O << "\t.set\tmacro\n"; 
-  O << "\t.set\treorder\n"; 
-
-  O << "\t.end\t" << *CurrentFnSym << '\n';
-  if (MAI->hasDotTypeDotSizeDirective() && !Subtarget->isLinux())
-    O << "\t.size\t" << *CurrentFnSym << ", .-" << *CurrentFnSym << '\n';
-}
-
 void MipsAsmPrinter::EmitFunctionEntryLabel() {
   O << "\t.ent\t" << *CurrentFnSym << '\n';
   OutStreamer.EmitLabel(CurrentFnSym);
@@ -264,8 +250,15 @@
     O << '\n';
   }
 
-  // Emit function end directives
-  emitFunctionEnd(MF);
+  // There are instruction for this macros, but they must
+  // always be at the function end, and we can't emit and
+  // break with BB logic. 
+  O << "\t.set\tmacro\n"; 
+  O << "\t.set\treorder\n"; 
+  
+  O << "\t.end\t" << *CurrentFnSym << '\n';
+  if (MAI->hasDotTypeDotSizeDirective() && !Subtarget->isLinux())
+    O << "\t.size\t" << *CurrentFnSym << ", .-" << *CurrentFnSym << '\n';
   
   // Print out jump tables referenced by the function
   EmitJumpTableInfo();