Make sure that weak functions are aligned properly

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26181 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-02-14 20:42:33 +00:00
parent ddf7532442
commit 33d5082779

View 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.