diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-07-31 18:48:30 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-07-31 18:48:30 +0000 |
| commit | a87dea4f8c546ca748f1777a8d1cabcc06515d91 (patch) | |
| tree | 96993fb5aee8978a97581a0f79f86c61b2e1005f /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
| parent | 5e5337a833c36b069723ff864c873a1ba4883b99 (diff) | |
| download | external_llvm-a87dea4f8c546ca748f1777a8d1cabcc06515d91.zip external_llvm-a87dea4f8c546ca748f1777a8d1cabcc06515d91.tar.gz external_llvm-a87dea4f8c546ca748f1777a8d1cabcc06515d91.tar.bz2 | |
switch off of 'Section' onto MCSection. We're not properly using
MCSection subclasses yet, but this is a step in the right direction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77708 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
| -rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 7106c6a..178bbaa 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -23,8 +23,9 @@ #include "llvm/CodeGen/DwarfWriter.h" #include "llvm/Analysis/DebugInfo.h" #include "llvm/MC/MCContext.h" -#include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCInst.h" +#include "llvm/MC/MCSection.h" +#include "llvm/MC/MCStreamer.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/FormattedStream.h" @@ -132,7 +133,7 @@ void AsmPrinter::SwitchToDataSection(const char *NewSection, /// SwitchToSection - Switch to the specified section of the executable if we /// are not already in it! -void AsmPrinter::SwitchToSection(const Section *NS) { +void AsmPrinter::SwitchToSection(const MCSection *NS) { const std::string &NewSection = NS->getName(); // If we're already in this section, we're done. @@ -308,10 +309,10 @@ void AsmPrinter::SetupMachineFunction(MachineFunction &MF) { namespace { // SectionCPs - Keep track the alignment, constpool entries per Section. struct SectionCPs { - const Section *S; + const MCSection *S; unsigned Alignment; SmallVector<unsigned, 4> CPEs; - SectionCPs(const Section *s, unsigned a) : S(s), Alignment(a) {}; + SectionCPs(const MCSection *s, unsigned a) : S(s), Alignment(a) {}; }; } @@ -347,7 +348,8 @@ void AsmPrinter::EmitConstantPool(MachineConstantPool *MCP) { } } - const Section *S =getObjFileLowering().getSectionForMergeableConstant(Kind); + const MCSection *S = + getObjFileLowering().getSectionForMergeableConstant(Kind); // The number of sections are small, just do a linear search from the // last section to the first. @@ -419,7 +421,7 @@ void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI, const char *JumpTableDataSection = TAI->getJumpTableDataSection(); const Function *F = MF.getFunction(); - const Section *FuncSection = + const MCSection *FuncSection = getObjFileLowering().SectionForGlobal(F, Mang, TM); bool JTInDiffSection = false; |
