diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-19 05:49:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-19 05:49:37 +0000 |
commit | 6c2f9e14fdf14d8c1c687c6bd9918183fa7f8a7f (patch) | |
tree | 18396ebe0fb76e50f0d46f9dc21f09ec9d82975f /lib/Target/PIC16/AsmPrinter | |
parent | 0a324aa53affc2fbadb95be577d22c9bebb1c29e (diff) | |
download | llvm-6c2f9e14fdf14d8c1c687c6bd9918183fa7f8a7f.tar.gz llvm-6c2f9e14fdf14d8c1c687c6bd9918183fa7f8a7f.tar.bz2 llvm-6c2f9e14fdf14d8c1c687c6bd9918183fa7f8a7f.tar.xz |
eliminate AsmPrinter::SwitchToSection and just have clients
talk to the MCStreamer directly instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79405 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16/AsmPrinter')
-rw-r--r-- | lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp b/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp index 8dbfffc6e6..1522e4ca2e 100644 --- a/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp +++ b/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp @@ -22,6 +22,7 @@ #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/DwarfWriter.h" #include "llvm/CodeGen/MachineModuleInfo.h" +#include "llvm/MC/MCStreamer.h" #include "llvm/Target/TargetRegistry.h" #include "llvm/Target/TargetLoweringObjectFile.h" #include "llvm/Support/ErrorHandling.h" @@ -73,7 +74,7 @@ bool PIC16AsmPrinter::runOnMachineFunction(MachineFunction &MF) { getObjFileLowering().getSectionForFunction(CurrentFnName); // Start the Code Section. O << "\n"; - SwitchToSection(fCodeSection); + OutStreamer.SwitchSection(fCodeSection); // Emit the frame address of the function at the beginning of code. O << "\tretlw low(" << PAN::getFrameLabel(CurrentFnName) << ")\n"; @@ -314,7 +315,7 @@ void PIC16AsmPrinter::EmitRomData(Module &M) { const std::vector<const GlobalVariable*> &Items = ROSections[i]->Items; if (!Items.size()) continue; O << "\n"; - SwitchToSection(PTOF->ROSections[i]->S_); + OutStreamer.SwitchSection(PTOF->ROSections[i]->S_); for (unsigned j = 0; j < Items.size(); j++) { O << Mang->getMangledName(Items[j]); Constant *C = Items[j]->getInitializer(); @@ -341,7 +342,7 @@ void PIC16AsmPrinter::EmitFunctionFrame(MachineFunction &MF) { const MCSection *fPDataSection = getObjFileLowering().getSectionForFunctionFrame(CurrentFnName); - SwitchToSection(fPDataSection); + OutStreamer.SwitchSection(fPDataSection); // Emit function frame label O << PAN::getFrameLabel(CurrentFnName) << ":\n"; @@ -384,7 +385,7 @@ void PIC16AsmPrinter::EmitIData(Module &M) { O << "\n"; if (IDATASections[i]->S_->getName().find("llvm.") != std::string::npos) continue; - SwitchToSection(IDATASections[i]->S_); + OutStreamer.SwitchSection(IDATASections[i]->S_); std::vector<const GlobalVariable*> Items = IDATASections[i]->Items; for (unsigned j = 0; j < Items.size(); j++) { std::string Name = Mang->getMangledName(Items[j]); @@ -403,7 +404,7 @@ void PIC16AsmPrinter::EmitUData(Module &M) { const std::vector<PIC16Section*> &BSSSections = PTOF->BSSSections; for (unsigned i = 0; i < BSSSections.size(); i++) { O << "\n"; - SwitchToSection(BSSSections[i]->S_); + OutStreamer.SwitchSection(BSSSections[i]->S_); std::vector<const GlobalVariable*> Items = BSSSections[i]->Items; for (unsigned j = 0; j < Items.size(); j++) { std::string Name = Mang->getMangledName(Items[j]); @@ -428,7 +429,7 @@ void PIC16AsmPrinter::EmitAutos(std::string FunctName) { if (AutosSections[i]->S_->getName() == SectionName) { // Set the printing status to true AutosSections[i]->setPrintedStatus(true); - SwitchToSection(AutosSections[i]->S_); + OutStreamer.SwitchSection(AutosSections[i]->S_); const std::vector<const GlobalVariable*> &Items = AutosSections[i]->Items; for (unsigned j = 0; j < Items.size(); j++) { std::string VarName = Mang->getMangledName(Items[j]); @@ -460,7 +461,7 @@ void PIC16AsmPrinter::EmitRemainingAutos() { AutosSections[i]->setPrintedStatus(true); O << "\n"; - SwitchToSection(AutosSections[i]->S_); + OutStreamer.SwitchSection(AutosSections[i]->S_); const std::vector<const GlobalVariable*> &Items = AutosSections[i]->Items; for (unsigned j = 0; j < Items.size(); j++) { std::string VarName = Mang->getMangledName(Items[j]); |