1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Treat common as distinct from weak global on Darwin x86.

llvm-svn: 51172
This commit is contained in:
Dale Johannesen 2008-05-16 00:52:06 +00:00
parent fe7f6bc9ce
commit ebc511c6aa

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;