diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-09-24 22:15:21 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-09-24 22:15:21 +0000 |
commit | 55b94965b25917c590987db1b92b730b64f17c0c (patch) | |
tree | 5e9f68cd2a027c2265c55447954bfcbc38d641cc /lib/Target | |
parent | 1a9edae76b2e7cf15c5f7c36928b3701ac2ef47b (diff) | |
download | external_llvm-55b94965b25917c590987db1b92b730b64f17c0c.zip external_llvm-55b94965b25917c590987db1b92b730b64f17c0c.tar.gz external_llvm-55b94965b25917c590987db1b92b730b64f17c0c.tar.bz2 |
Get rid of duplicate char*/Section* TextSection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56574 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/DarwinTargetAsmInfo.cpp | 2 | ||||
-rw-r--r-- | lib/Target/ELFTargetAsmInfo.cpp | 3 | ||||
-rw-r--r-- | lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 4 | ||||
-rw-r--r-- | lib/Target/TargetAsmInfo.cpp | 7 | ||||
-rw-r--r-- | lib/Target/X86/X86TargetAsmInfo.cpp | 2 |
5 files changed, 8 insertions, 10 deletions
diff --git a/lib/Target/DarwinTargetAsmInfo.cpp b/lib/Target/DarwinTargetAsmInfo.cpp index 2fc1d28..a5b72e3 100644 --- a/lib/Target/DarwinTargetAsmInfo.cpp +++ b/lib/Target/DarwinTargetAsmInfo.cpp @@ -82,7 +82,7 @@ DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { if (isWeak) return TextCoalSection; else - return getTextSection_(); + return getTextSection(); case SectionKind::Data: case SectionKind::ThreadData: case SectionKind::BSS: diff --git a/lib/Target/ELFTargetAsmInfo.cpp b/lib/Target/ELFTargetAsmInfo.cpp index 9ffc72d..4529d01 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; - TextSection_ = getUnnamedSection("\t.text", SectionFlags::Code); DataSection_ = getUnnamedSection("\t.data", SectionFlags::Writeable); BSSSection_ = getUnnamedSection("\t.bss", SectionFlags::Writeable | SectionFlags::BSS); @@ -49,7 +48,7 @@ ELFTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { case Function::InternalLinkage: case Function::DLLExportLinkage: case Function::ExternalLinkage: - return getTextSection_(); + return getTextSection(); case Function::WeakLinkage: case Function::LinkOnceLinkage: std::string Name = UniqueSectionForGlobal(GV, Kind); diff --git a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp index 2d9ecbd..f21cb4e 100644 --- a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp @@ -637,7 +637,7 @@ bool PPCLinuxAsmPrinter::doInitialization(Module &M) { // GNU as handles section names wrapped in quotes Mang->setUseQuotes(true); - SwitchToTextSection(TAI->getTextSection()); + SwitchToSection(TAI->getTextSection()); return Result; } @@ -864,7 +864,7 @@ bool PPCDarwinAsmPrinter::doInitialization(Module &M) { SwitchToTextSection("\t.section __TEXT,__symbol_stub1,symbol_stubs," "pure_instructions,16"); } - SwitchToTextSection(TAI->getTextSection()); + SwitchToSection(TAI->getTextSection()); return Result; } diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp index 536f16d..df54039 100644 --- a/lib/Target/TargetAsmInfo.cpp +++ b/lib/Target/TargetAsmInfo.cpp @@ -26,8 +26,7 @@ using namespace llvm; TargetAsmInfo::TargetAsmInfo() : - TextSection("\t.text"), - TextSection_(0), + TextSection(0), DataSection("\t.data"), DataSection_(0), BSSSection("\t.bss"), @@ -126,7 +125,7 @@ TargetAsmInfo::TargetAsmInfo() : DwarfEHFrameSection(".eh_frame"), DwarfExceptionSection(".gcc_except_table"), AsmTransCBE(0) { - TextSection_ = getUnnamedSection(TextSection); + TextSection = getUnnamedSection("\t.text", SectionFlags::Code); DataSection_ = getUnnamedSection(DataSection); } @@ -300,7 +299,7 @@ TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { return getNamedSection(Name.c_str(), Flags); } else { if (Kind == SectionKind::Text) - return getTextSection_(); + return getTextSection(); else if (isBSS(Kind) && getBSSSection_()) return getBSSSection_(); else if (getReadOnlySection_() && SectionKind::isReadOnly(Kind)) diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp index 64858f8..9f9e2ed 100644 --- a/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/lib/Target/X86/X86TargetAsmInfo.cpp @@ -433,7 +433,7 @@ X86WinTargetAsmInfo::X86WinTargetAsmInfo(const X86TargetMachine &TM): Data64bitsDirective = "\tdq\t"; HasDotTypeDotSizeDirective = false; - TextSection = "_text"; + TextSection = getUnnamedSection("_text", SectionFlags::Code); DataSection = "_data"; JumpTableDataSection = NULL; SwitchToSectionDirective = ""; |