diff options
| author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-09-24 22:16:16 +0000 |
|---|---|---|
| committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-09-24 22:16:16 +0000 |
| commit | cca60fa0d98abdf7dbe69a4ef15c539d80f6e9bf (patch) | |
| tree | d53db5d84425b2696f3617c9a8dde3cd0c0b4f6f /lib/Target | |
| parent | 55b94965b25917c590987db1b92b730b64f17c0c (diff) | |
| download | external_llvm-cca60fa0d98abdf7dbe69a4ef15c539d80f6e9bf.zip external_llvm-cca60fa0d98abdf7dbe69a4ef15c539d80f6e9bf.tar.gz external_llvm-cca60fa0d98abdf7dbe69a4ef15c539d80f6e9bf.tar.bz2 | |
Get rid of duplicate char*/Section* DataSection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56575 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
| -rw-r--r-- | lib/Target/ARM/ARMTargetAsmInfo.cpp | 1 | ||||
| -rw-r--r-- | lib/Target/DarwinTargetAsmInfo.cpp | 2 | ||||
| -rw-r--r-- | lib/Target/ELFTargetAsmInfo.cpp | 3 | ||||
| -rw-r--r-- | lib/Target/TargetAsmInfo.cpp | 9 | ||||
| -rw-r--r-- | lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp | 2 | ||||
| -rw-r--r-- | lib/Target/X86/X86TargetAsmInfo.cpp | 3 |
6 files changed, 9 insertions, 11 deletions
diff --git a/lib/Target/ARM/ARMTargetAsmInfo.cpp b/lib/Target/ARM/ARMTargetAsmInfo.cpp index a1a00a2..d41f350 100644 --- a/lib/Target/ARM/ARMTargetAsmInfo.cpp +++ b/lib/Target/ARM/ARMTargetAsmInfo.cpp @@ -48,7 +48,6 @@ ARMTargetAsmInfo::ARMTargetAsmInfo(const ARMTargetMachine &TM) { AlignmentIsInBytes = false; Data64bitsDirective = 0; CommentString = "@"; - DataSection = "\t.data"; ConstantPoolSection = "\t.text\n"; COMMDirectiveTakesAlignment = false; InlineAsmStart = "@ InlineAsm Start"; diff --git a/lib/Target/DarwinTargetAsmInfo.cpp b/lib/Target/DarwinTargetAsmInfo.cpp index a5b72e3..6a53b6b 100644 --- a/lib/Target/DarwinTargetAsmInfo.cpp +++ b/lib/Target/DarwinTargetAsmInfo.cpp @@ -90,7 +90,7 @@ DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { if (cast<GlobalVariable>(GV)->isConstant()) return (isWeak ? ConstDataCoalSection : ConstDataSection); else - return (isWeak ? DataCoalSection : getDataSection_()); + return (isWeak ? DataCoalSection : getDataSection()); case SectionKind::ROData: return (isWeak ? ConstDataCoalSection : (isNonStatic ? ConstDataSection : getReadOnlySection_())); diff --git a/lib/Target/ELFTargetAsmInfo.cpp b/lib/Target/ELFTargetAsmInfo.cpp index 4529d01..df4e43d 100644 --- a/lib/Target/ELFTargetAsmInfo.cpp +++ b/lib/Target/ELFTargetAsmInfo.cpp @@ -27,7 +27,6 @@ using namespace llvm; ELFTargetAsmInfo::ELFTargetAsmInfo(const TargetMachine &TM) { ETM = &TM; - DataSection_ = getUnnamedSection("\t.data", SectionFlags::Writeable); BSSSection_ = getUnnamedSection("\t.bss", SectionFlags::Writeable | SectionFlags::BSS); ReadOnlySection_ = getNamedSection("\t.rodata", SectionFlags::None); @@ -64,7 +63,7 @@ ELFTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { switch (Kind) { case SectionKind::Data: case SectionKind::SmallData: - return getDataSection_(); + return getDataSection(); case SectionKind::BSS: case SectionKind::SmallBSS: // ELF targets usually have BSS sections diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp index df54039..e963d71 100644 --- a/lib/Target/TargetAsmInfo.cpp +++ b/lib/Target/TargetAsmInfo.cpp @@ -27,8 +27,7 @@ using namespace llvm; TargetAsmInfo::TargetAsmInfo() : TextSection(0), - DataSection("\t.data"), - DataSection_(0), + DataSection(0), BSSSection("\t.bss"), BSSSection_(0), ReadOnlySection(0), @@ -126,7 +125,7 @@ TargetAsmInfo::TargetAsmInfo() : DwarfExceptionSection(".gcc_except_table"), AsmTransCBE(0) { TextSection = getUnnamedSection("\t.text", SectionFlags::Code); - DataSection_ = getUnnamedSection(DataSection); + DataSection = getUnnamedSection("\t.data", SectionFlags::Writeable); } TargetAsmInfo::~TargetAsmInfo() { @@ -306,14 +305,14 @@ TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { return getReadOnlySection_(); } - return getDataSection_(); + return getDataSection(); } // Lame default implementation. Calculate the section name for machine const. const Section* TargetAsmInfo::SelectSectionForMachineConst(const Type *Ty) const { // FIXME: Support data.rel stuff someday - return getDataSection_(); + return getDataSection(); } std::string diff --git a/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp index ec0bfeb..262e0f7 100644 --- a/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp @@ -481,7 +481,7 @@ bool X86IntelAsmPrinter::doFinalization(Module &M) { O << "\tpublic " << name << "\n"; // FALL THROUGH case GlobalValue::InternalLinkage: - SwitchToDataSection(TAI->getDataSection(), I); + SwitchToSection(TAI->getDataSection()); break; default: assert(0 && "Unknown linkage type!"); diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp index 9f9e2ed..b31da8f 100644 --- a/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/lib/Target/X86/X86TargetAsmInfo.cpp @@ -434,7 +434,8 @@ X86WinTargetAsmInfo::X86WinTargetAsmInfo(const X86TargetMachine &TM): HasDotTypeDotSizeDirective = false; TextSection = getUnnamedSection("_text", SectionFlags::Code); - DataSection = "_data"; + DataSection = getUnnamedSection("_data", SectionFlags::Writeable); + JumpTableDataSection = NULL; SwitchToSectionDirective = ""; TextSectionStartSuffix = "\tsegment 'CODE'"; |
