if (Subtarget->isTargetELF())
O << "\t.type " << name << ",%object\n";
- if (C->isNullValue()) {
+ if (C->isNullValue() && !I->hasSection()) {
if (I->hasExternalLinkage()) {
if (const char *Directive = TAI->getZeroFillDirective()) {
O << "\t.globl\t" << name << "\n";
}
}
- if (!I->hasSection() &&
- (I->hasInternalLinkage() || I->hasWeakLinkage() ||
- I->hasLinkOnceLinkage())) {
+ if (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);
unsigned Align = TD->getPreferredAlignmentLog(I);
if (C->isNullValue() && /* FIXME: Verify correct */
+ !I->hasSection() &&
(I->hasInternalLinkage() || I->hasWeakLinkage() ||
- I->hasLinkOnceLinkage() ||
- (I->hasExternalLinkage() && !I->hasSection()))) {
+ I->hasLinkOnceLinkage() || I->hasExternalLinkage())) {
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
if (I->hasExternalLinkage()) {
O << "\t.global " << name << '\n';
if (Subtarget->isTargetELF())
O << "\t.type\t" << name << ",@object\n";
- if (C->isNullValue()) {
+ if (C->isNullValue() && !I->hasSection()) {
if (I->hasExternalLinkage()) {
if (const char *Directive = TAI->getZeroFillDirective()) {
O << "\t.globl\t" << name << "\n";
}
}
- if (!I->hasSection() && !I->isThreadLocal() &&
+ if (!I->isThreadLocal() &&
(I->hasInternalLinkage() || I->hasWeakLinkage() ||
I->hasLinkOnceLinkage())) {
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.