diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-24 04:08:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-24 04:08:17 +0000 |
commit | 87bc69bc872258a4e16d38e5b10ee9816765c7a1 (patch) | |
tree | 5e2f727122708fb6eea1a71fd91f0d8e3547a88b /lib/Target | |
parent | dbfe50260bca517f2ffa3d6ecbdf22650085bd26 (diff) | |
download | external_llvm-87bc69bc872258a4e16d38e5b10ee9816765c7a1.zip external_llvm-87bc69bc872258a4e16d38e5b10ee9816765c7a1.tar.gz external_llvm-87bc69bc872258a4e16d38e5b10ee9816765c7a1.tar.bz2 |
use section flags more correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76944 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp | 5 | ||||
-rw-r--r-- | lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 3 | ||||
-rw-r--r-- | lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | 5 |
3 files changed, 6 insertions, 7 deletions
diff --git a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp index e863043..d69ca32 100644 --- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp @@ -1103,9 +1103,8 @@ void ARMAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) { SwitchToSection(TheSection); if (C->isNullValue() && !GVar->hasSection() && !GVar->isThreadLocal() && - !(isDarwin && TheSection->getFlags() == SectionKind::RODataMergeStr)) { - // FIXME: This seems to be pretty darwin-specific - + // Don't put things that should go in the cstring section into "comm". + !TheSection->hasFlag(SectionFlags::Strings)) { if (GVar->hasExternalLinkage()) { if (const char *Directive = TAI->getZeroFillDirective()) { O << "\t.globl\t" << name << "\n"; diff --git a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp index 9c0aa74..1ac3e32 100644 --- a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp @@ -897,7 +897,8 @@ void PPCDarwinAsmPrinter::PrintGlobalVariable(const GlobalVariable *GVar) { !GVar->hasSection() && (GVar->hasLocalLinkage() || GVar->hasExternalLinkage() || GVar->isWeakForLinker()) && - TheSection->getFlags() != SectionKind::RODataMergeStr) { + // Don't put things that should go in the cstring section into "comm". + !TheSection->hasFlag(SectionFlags::Strings)) { if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it. if (GVar->hasExternalLinkage()) { diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp index 334172a..6e44b9b 100644 --- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp @@ -798,9 +798,8 @@ void X86ATTAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) { SwitchToSection(TheSection); if (C->isNullValue() && !GVar->hasSection() && - !(Subtarget->isTargetDarwin() && - TAI->SectionKindForGlobal(GVar) == SectionKind::RODataMergeStr)) { - // FIXME: This seems to be pretty darwin-specific + // Don't put things that should go in the cstring section into "comm". + !TheSection->hasFlag(SectionFlags::Strings)) { if (GVar->hasExternalLinkage()) { if (const char *Directive = TAI->getZeroFillDirective()) { O << "\t.globl " << name << '\n'; |