summaryrefslogtreecommitdiff
path: root/lib/Target/PIC16/AsmPrinter
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-21 23:08:09 +0000
committerChris Lattner <sabre@nondot.org>2009-08-21 23:08:09 +0000
commitec3579ff0d1d0872074d7f726f63e4aae90e6679 (patch)
tree9714d07ab0ec2af6f3e4e55b48fa46a91434b468 /lib/Target/PIC16/AsmPrinter
parentd6f761e0eb610936a6b8495360b62696dcd85164 (diff)
downloadllvm-ec3579ff0d1d0872074d7f726f63e4aae90e6679.tar.gz
llvm-ec3579ff0d1d0872074d7f726f63e4aae90e6679.tar.bz2
llvm-ec3579ff0d1d0872074d7f726f63e4aae90e6679.tar.xz
revert 79631
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16/AsmPrinter')
-rw-r--r--lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp20
-rw-r--r--lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h2
2 files changed, 6 insertions, 16 deletions
diff --git a/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp b/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
index 65309ea675..b96ae54005 100644
--- a/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
+++ b/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
@@ -73,7 +73,7 @@ bool PIC16AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
DbgInfo.BeginFunction(MF);
// Emit the autos section of function.
- EmitAutos(F);
+ EmitAutos(CurrentFnName);
// Now emit the instructions of function in its code section.
const MCSection *fCodeSection =
@@ -362,10 +362,9 @@ void PIC16AsmPrinter::EmitFunctionFrame(MachineFunction &MF) {
const TargetData *TD = TM.getTargetData();
// Emit the data section name.
O << "\n";
-
- std::string SectionName = getObjFileLowering().getNameForFunctFrame(F);
+
const MCSection *fPDataSection =
- getObjFileLowering().getSectionForFunctionFrame(SectionName);
+ getObjFileLowering().getSectionForFunctionFrame(CurrentFnName);
OutStreamer.SwitchSection(fPDataSection);
// Emit function frame label
@@ -441,12 +440,12 @@ void PIC16AsmPrinter::EmitUData(Module &M) {
}
}
-void PIC16AsmPrinter::EmitAutos(const Function *F) {
+void PIC16AsmPrinter::EmitAutos(std::string FunctName) {
// Section names for all globals are already set.
const TargetData *TD = TM.getTargetData();
// Now print Autos section for this function.
- std::string SectionName = PAN::getAutosSectionName(CurrentFnName);
+ std::string SectionName = PAN::getAutosSectionName(FunctName);
// If this function is a cloned function then the name of auto section
// will not be present in the list of existing section. Hence this section
@@ -460,15 +459,6 @@ void PIC16AsmPrinter::EmitAutos(const Function *F) {
if (AutosSections[i]->S_->getName() == SectionName) {
// Set the printing status to true
AutosSections[i]->setPrintedStatus(true);
- // Overlay auto sections with same function color.
- std::string BaseSectionName = getObjFileLowering().
- getNameForFunctFrame(F, true);
- if (BaseSectionName != F->getName()) {
- std::string NewSectionName = PAN::getAutosSectionName(BaseSectionName);
- const_cast<MCSectionPIC16 *>(AutosSections[i]->S_)->setName(
- NewSectionName);
- }
-
OutStreamer.SwitchSection(AutosSections[i]->S_);
const std::vector<const GlobalVariable*> &Items = AutosSections[i]->Items;
for (unsigned j = 0; j < Items.size(); j++) {
diff --git a/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h b/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h
index ece19ca260..55a2fcf85a 100644
--- a/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h
+++ b/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h
@@ -52,7 +52,7 @@ namespace llvm {
void EmitDefinedVars (Module &M);
void EmitIData (Module &M);
void EmitUData (Module &M);
- void EmitAutos (const Function *F);
+ void EmitAutos (std::string FunctName);
void EmitRemainingAutos ();
void EmitRomData (Module &M);
void EmitFunctionFrame(MachineFunction &MF);