Treat common as distinct from weak global on Darwin x86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51172 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dale Johannesen 2008-05-16 00:52:06 +00:00
parent eedff319dc
commit f88c81e332

View File

@ -211,6 +211,16 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
O << TAI->getLCOMMDirective() << name << "," << Size;
if (Subtarget->isTargetDarwin())
O << "," << Align;
} else if (Subtarget->isTargetDarwin() && !I->hasCommonLinkage()) {
O << "\t.globl " << name << "\n"
<< TAI->getWeakDefDirective() << name << "\n";
SwitchToDataSection("\t.section __DATA,__datacoal_nt,coalesced", I);
EmitAlignment(Align, I);
O << name << ":\t\t\t\t" << TAI->getCommentString() << " ";
PrintUnmangledNameSafely(I, O);
O << "\n";
EmitGlobalConstant(C);
continue;
} else {
O << TAI->getCOMMDirective() << name << "," << Size;