forked from OSchip/llvm-project
Revert the part of 45848 that treated weak globals
as weak globals rather than commons. While not wrong, this change tickled a latent bug in Darwin's strip, so revert it for now as a workaround. llvm-svn: 46144
This commit is contained in:
parent
85be7cf8ca
commit
60a9855799
|
@ -917,7 +917,8 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
|
|||
|
||||
if (C->isNullValue() && /* FIXME: Verify correct */
|
||||
!I->hasSection() &&
|
||||
(I->hasInternalLinkage() || I->hasExternalLinkage())) {
|
||||
(I->hasInternalLinkage() || I->hasWeakLinkage() ||
|
||||
I->hasLinkOnceLinkage() || I->hasExternalLinkage())) {
|
||||
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
|
||||
if (I->hasExternalLinkage()) {
|
||||
O << "\t.globl " << name << '\n';
|
||||
|
|
|
@ -181,9 +181,8 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
|
|||
}
|
||||
|
||||
if (!I->isThreadLocal() &&
|
||||
(I->hasInternalLinkage() ||
|
||||
(!Subtarget->isTargetDarwin() &&
|
||||
(I->hasWeakLinkage() || I->hasLinkOnceLinkage())))) {
|
||||
(I->hasInternalLinkage() || I->hasWeakLinkage() ||
|
||||
I->hasLinkOnceLinkage())) {
|
||||
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
|
||||
if (!NoZerosInBSS && TAI->getBSSSection())
|
||||
SwitchToDataSection(TAI->getBSSSection(), I);
|
||||
|
|
Loading…
Reference in New Issue