Make EmitFunctionHeader a private helper.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 17 Mar 2015 14:38:30 +0000 (14:38 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 17 Mar 2015 14:38:30 +0000 (14:38 +0000)
llvm-svn: 232481

llvm/include/llvm/CodeGen/AsmPrinter.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/Target/ARM/ARMAsmPrinter.cpp
llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp
llvm/lib/Target/X86/X86AsmPrinter.cpp

index dd20fdd..ffb4d1b 100644 (file)
@@ -198,7 +198,6 @@ public:
   /// Emit the specified function out to the OutStreamer.
   bool runOnMachineFunction(MachineFunction &MF) override {
     SetupMachineFunction(MF);
-    EmitFunctionHeader();
     EmitFunctionBody();
     return false;
   }
@@ -211,9 +210,6 @@ public:
   /// runOnMachineFunction.
   void SetupMachineFunction(MachineFunction &MF);
 
-  /// This method emits the header for the current function.
-  void EmitFunctionHeader();
-
   /// This method emits the body and trailer for a function.
   void EmitFunctionBody();
 
@@ -504,6 +500,9 @@ private:
   mutable unsigned Counter;
   mutable unsigned SetCounter;
 
+  /// This method emits the header for the current function.
+  void EmitFunctionHeader();
+
   /// Emit a blob of inline asm to the output streamer.
   void
   EmitInlineAsm(StringRef Str, const MCSubtargetInfo &STI,
index 5098768..3784851 100644 (file)
@@ -782,6 +782,8 @@ void AsmPrinter::emitFrameAlloc(const MachineInstr &MI) {
 /// EmitFunctionBody - This method emits the body and trailer for a
 /// function.
 void AsmPrinter::EmitFunctionBody() {
+  EmitFunctionHeader();
+
   // Emit target-specific gunk before the function body.
   EmitFunctionBodyStart();
 
index 2c9f32b..e3c9dcb 100644 (file)
@@ -120,9 +120,6 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
     OutStreamer.EndCOFFSymbolDef();
   }
 
-  // Have common code print out the function header with linkage info etc.
-  EmitFunctionHeader();
-
   // Emit the rest of the function body.
   EmitFunctionBody();
 
index 35e95fc..d911014 100644 (file)
@@ -127,7 +127,6 @@ bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
   HexLines.clear();
   DisasmLineMaxLen = 0;
 
-  EmitFunctionHeader();
   EmitFunctionBody();
 
   if (isVerbose()) {
index bb0b9ce..f6033a7 100644 (file)
@@ -63,9 +63,6 @@ bool X86AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
     OutStreamer.EndCOFFSymbolDef();
   }
 
-  // Have common code print out the function header with linkage info etc.
-  EmitFunctionHeader();
-
   // Emit the rest of the function body.
   EmitFunctionBody();