From: Chris Lattner Date: Wed, 5 Aug 2009 20:49:52 +0000 (+0000) Subject: remove the 'DataSectionStartSuffix' and 'TextSectionStartSuffix' knobs. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cafbdc5c095f4cc84e74e0286651cf8daa6efa2a;p=oota-llvm.git remove the 'DataSectionStartSuffix' and 'TextSectionStartSuffix' knobs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78242 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index 2efec329f30..e24302b84ef 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -190,14 +190,6 @@ namespace llvm { /// this. const char *SwitchToSectionDirective; // Defaults to "\t.section\t" - /// TextSectionStartSuffix - This is printed after each start of section - /// directive for text sections. - const char *TextSectionStartSuffix; // Defaults to "". - - /// DataSectionStartSuffix - This is printed after each start of section - /// directive for data sections. - const char *DataSectionStartSuffix; // Defaults to "". - /// JumpTableDirective - if non-null, the directive to emit before a jump /// table. const char *JumpTableDirective; @@ -444,12 +436,6 @@ namespace llvm { const char *getSwitchToSectionDirective() const { return SwitchToSectionDirective; } - const char *getTextSectionStartSuffix() const { - return TextSectionStartSuffix; - } - const char *getDataSectionStartSuffix() const { - return DataSectionStartSuffix; - } const char *getGlobalDirective() const { return GlobalDirective; } diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 69bc5edf372..3102bdae017 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -92,21 +92,19 @@ void AsmPrinter::SwitchToSection(const MCSection *NS) { CurrentSection = NS; - if (NS != 0) { - // If section is named we need to switch into it via special '.section' - // directive and also append funky flags. Otherwise - section name is just - // some magic assembler directive. - if (!NS->isDirective()) { - SmallString<32> FlagsStr; - - getObjFileLowering().getSectionFlagsAsString(NS->getKind(), FlagsStr); - - O << TAI->getSwitchToSectionDirective() - << CurrentSection->getName() << FlagsStr.c_str(); - } else { - O << CurrentSection->getName(); - } - O << TAI->getDataSectionStartSuffix() << '\n'; + if (NS == 0) return; + + // If section is named we need to switch into it via special '.section' + // directive and also append funky flags. Otherwise - section name is just + // some magic assembler directive. + if (!NS->isDirective()) { + SmallString<32> FlagsStr; + getObjFileLowering().getSectionFlagsAsString(NS->getKind(), FlagsStr); + + O << TAI->getSwitchToSectionDirective() + << CurrentSection->getName() << FlagsStr.c_str() << '\n'; + } else { + O << CurrentSection->getName() << '\n'; } } diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp index 5be769319bd..5f20ea0fc1b 100644 --- a/lib/Target/TargetAsmInfo.cpp +++ b/lib/Target/TargetAsmInfo.cpp @@ -55,8 +55,6 @@ TargetAsmInfo::TargetAsmInfo() { AlignmentIsInBytes = true; TextAlignFillValue = 0; SwitchToSectionDirective = "\t.section\t"; - TextSectionStartSuffix = ""; - DataSectionStartSuffix = ""; JumpTableDirective = 0; GlobalDirective = "\t.globl\t"; SetDirective = 0; diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp index 3a5772c19ef..297ebf594b0 100644 --- a/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/lib/Target/X86/X86TargetAsmInfo.cpp @@ -130,10 +130,6 @@ X86WinTargetAsmInfo::X86WinTargetAsmInfo(const X86TargetMachine &TM): HasSingleParameterDotFile = false; AlignmentIsInBytes = true; - - SwitchToSectionDirective = ""; - TextSectionStartSuffix = "\tSEGMENT PARA 'CODE'"; - DataSectionStartSuffix = "\tSEGMENT PARA 'DATA'"; } // Instantiate default implementation.