diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-09-21 00:41:19 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-09-21 00:41:19 +0000 |
commit | 1ff71872c25053c0b5a9d15bc7a1dd2c739792c9 (patch) | |
tree | 58438d4e12c0faf0e695e3617afd183f4c569d79 /llvm/lib/Target/ARM/ARMAsmPrinter.cpp | |
parent | 146a0ea071e18fff781185d520008fee55d913e4 (diff) | |
download | bcm5719-llvm-1ff71872c25053c0b5a9d15bc7a1dd2c739792c9.tar.gz bcm5719-llvm-1ff71872c25053c0b5a9d15bc7a1dd2c739792c9.zip |
Honor user-defined section specification of a global, ignores whether its initializer is null.
llvm-svn: 42182
Diffstat (limited to 'llvm/lib/Target/ARM/ARMAsmPrinter.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMAsmPrinter.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp index f637dec9d9a..342e52a1b2b 100644 --- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp @@ -835,7 +835,7 @@ bool ARMAsmPrinter::doFinalization(Module &M) { 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"; @@ -845,9 +845,8 @@ bool ARMAsmPrinter::doFinalization(Module &M) { } } - 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); |