diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-18 02:19:52 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-18 02:19:52 +0000 |
commit | caa0c2caddcfb56de09e016c4c153d0609ffcf6e (patch) | |
tree | 91bb25a13862692d2b2df61a4a6258551adb2dcf /lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | |
parent | ccd846b73ffce9296e392e550712926845098fab (diff) | |
download | external_llvm-caa0c2caddcfb56de09e016c4c153d0609ffcf6e.zip external_llvm-caa0c2caddcfb56de09e016c4c153d0609ffcf6e.tar.gz external_llvm-caa0c2caddcfb56de09e016c4c153d0609ffcf6e.tar.bz2 |
GV with null value initializer shouldn't go to BSS if it's meant for a mergeable strings section. Currently it only checks for Darwin. Someone else please check if it should apply to other targets as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64877 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp')
-rw-r--r-- | lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp index 75a34a6..9af3ba6 100644 --- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp @@ -799,7 +799,9 @@ void X86ATTAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { SwitchToSection(TAI->SectionForGlobal(GVar)); - if (C->isNullValue() && !GVar->hasSection()) { + if (C->isNullValue() && !GVar->hasSection() && + !(Subtarget->isTargetDarwin() && + TAI->SectionKindForGlobal(GVar) == SectionKind::RODataMergeStr)) { // FIXME: This seems to be pretty darwin-specific if (GVar->hasExternalLinkage()) { if (const char *Directive = TAI->getZeroFillDirective()) { |