Functions with LinkOnce and weak linkage still need to be aligned. Doh.

llvm-svn: 40499
This commit is contained in:
Evan Cheng 2007-07-25 22:28:16 +00:00
parent 8707412593
commit 5c6a31e9a0
1 changed files with 1 additions and 0 deletions

View File

@ -111,6 +111,7 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
case Function::LinkOnceLinkage:
case Function::WeakLinkage:
if (Subtarget->isTargetDarwin()) {
EmitAlignment(4, F); // FIXME: This should be parameterized somewhere.
O << "\t.globl\t" << CurrentFnName << "\n";
O << "\t.weak_definition\t" << CurrentFnName << "\n";
} else if (Subtarget->isTargetCygMing()) {