Make sure that weak functions are aligned properly
authorChris Lattner <sabre@nondot.org>
Tue, 14 Feb 2006 20:42:33 +0000 (20:42 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 14 Feb 2006 20:42:33 +0000 (20:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26181 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCAsmPrinter.cpp

index f46d8236bf28f7c838f67752cc4f46725916b7ee..e66b0e86e2684d4eebb8998b1841165eefba3055 100644 (file)
@@ -464,11 +464,9 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
   default: assert(0 && "Unknown linkage type!");
   case Function::InternalLinkage:  // Symbols default to internal.
     SwitchSection(".text", F);
-    EmitAlignment(4, F);
     break;
   case Function::ExternalLinkage:
     SwitchSection(".text", F);
-    EmitAlignment(4, F);
     O << "\t.globl\t" << CurrentFnName << "\n";
     break;
   case Function::WeakLinkage:
@@ -479,6 +477,7 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
     O << "\t.weak_definition\t" << CurrentFnName << "\n";
     break;
   }
+  EmitAlignment(4, F);
   O << CurrentFnName << ":\n";
 
   // Print out code for the function.