diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-08 22:41:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-08 22:41:53 +0000 |
commit | 1cb9396f4f3d2cdf6bf25b12eec6867c65645e55 (patch) | |
tree | 181ae850501f5204ecdb055cc0368d26a30b0f53 /llvm/lib/CodeGen/AsmPrinter | |
parent | 089b7de20dac7361b80f75e82961e053bdc5d7ff (diff) | |
download | bcm5719-llvm-1cb9396f4f3d2cdf6bf25b12eec6867c65645e55.tar.gz bcm5719-llvm-1cb9396f4f3d2cdf6bf25b12eec6867c65645e55.zip |
1. Make MCSection an abstract class.
2. Move section switch printing to MCSection virtual method which takes a
TAI. This eliminates textual formatting stuff from TLOF.
3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and
TLOFELF::AtIsCommentChar.
llvm-svn: 78510
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 68cd4a49ab6..61577a5707b 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -94,18 +94,7 @@ void AsmPrinter::SwitchToSection(const MCSection *NS) { 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, *TAI); - - O << TAI->getSwitchToSectionDirective() - << CurrentSection->getName() << FlagsStr.c_str() << '\n'; - } else { - O << CurrentSection->getName() << '\n'; - } + NS->PrintSwitchToSection(*TAI, O); } void AsmPrinter::getAnalysisUsage(AnalysisUsage &AU) const { |