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 | d0d09fcf74cd20325acc3dcc38007c4ebc2816ff (patch) | |
| tree | 84b7cceebedea3e4afd191e06686054be73baf22 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
| parent | ae37dfe9a34a5be05a5a6d78bf4ac665ec5fb1bf (diff) | |
| download | external_llvm-d0d09fcf74cd20325acc3dcc38007c4ebc2816ff.zip external_llvm-d0d09fcf74cd20325acc3dcc38007c4ebc2816ff.tar.gz external_llvm-d0d09fcf74cd20325acc3dcc38007c4ebc2816ff.tar.bz2 | |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78510 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
| -rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 68cd4a4..61577a5 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/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 { |
