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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232481 91177308-0d34-0410-b5e6-96231b3b80d8

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

index dd20fdd748f9184f836ca4ebd2d6146a3d3ebb32..ffb4d1b95bbce380096c86cfb3c83c8aa2b82584 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 509876863d1a7937cdaea92348ea993ae646ee07..37848510f9a02244646c357c6f9886643d9fe752 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 2c9f32b23fb611f6920614cc80176cfca4040677..e3c9dcbf72b1b5323cfb9c2f7c3ac81c1dd99e90 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 35e95fc2aa5a8fb1398136f053f1da3906cbe6ab..d9110146ac0574290f7af439f0c7462c6ab6cd33 100644 (file)
@@ -127,7 +127,6 @@ bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
   HexLines.clear();
   DisasmLineMaxLen = 0;
 
-  EmitFunctionHeader();
   EmitFunctionBody();
 
   if (isVerbose()) {
index bb0b9cec83dd23e124ae5c6ad1b93a54a219093f..f6033a7e15713666ba40f37a59081b431608244a 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();