aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PIC16/PIC16AsmPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/PIC16/PIC16AsmPrinter.cpp')
-rw-r--r--lib/Target/PIC16/PIC16AsmPrinter.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/Target/PIC16/PIC16AsmPrinter.cpp b/lib/Target/PIC16/PIC16AsmPrinter.cpp
index e98cf41..55ec1fe 100644
--- a/lib/Target/PIC16/PIC16AsmPrinter.cpp
+++ b/lib/Target/PIC16/PIC16AsmPrinter.cpp
@@ -68,12 +68,8 @@ bool PIC16AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
EmitAutos(CurrentFnName);
// Now emit the instructions of function in its code section.
- std::string T = PAN::getCodeSectionName(CurrentFnName);
- const char *codeSection = T.c_str();
-
const MCSection *fCodeSection =
- getObjFileLowering().getOrCreateSection(codeSection, false,
- SectionKind::getText());
+ getObjFileLowering().getSectionForFunction(CurrentFnName);
// Start the Code Section.
O << "\n";
SwitchToSection(fCodeSection);
@@ -347,12 +343,9 @@ void PIC16AsmPrinter::EmitFunctionFrame(MachineFunction &MF) {
const TargetData *TD = TM.getTargetData();
// Emit the data section name.
O << "\n";
- std::string T = PAN::getFrameSectionName(CurrentFnName);
- const char *SectionName = T.c_str();
-
+
const MCSection *fPDataSection =
- getObjFileLowering().getOrCreateSection(SectionName, false,
- SectionKind::getDataRel());
+ getObjFileLowering().getSectionForFunctionFrame(CurrentFnName);
SwitchToSection(fPDataSection);
// Emit function frame label