diff options
author | Dale Johannesen <dalej@apple.com> | 2008-01-17 23:04:07 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-01-17 23:04:07 +0000 |
commit | 50085daa5180c4de1a411522f21c2362a92575d6 (patch) | |
tree | 0f424aeefa8754367e93112db0d7ea09a80b0054 | |
parent | 394e26df9df2c45001aa4fc7a099a9bc661458f0 (diff) | |
download | external_llvm-50085daa5180c4de1a411522f21c2362a92575d6.zip external_llvm-50085daa5180c4de1a411522f21c2362a92575d6.tar.gz external_llvm-50085daa5180c4de1a411522f21c2362a92575d6.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46144 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/PowerPC/PPCAsmPrinter.cpp | 3 | ||||
-rw-r--r-- | lib/Target/X86/X86AsmPrinter.cpp | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index fb84181..d5367dc 100644 --- a/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -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'; diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp index b0e8165..f9756f0 100644 --- a/lib/Target/X86/X86AsmPrinter.cpp +++ b/lib/Target/X86/X86AsmPrinter.cpp @@ -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); |