Drop obsolete hook and change all usage to new interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56572 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp
index 8fa5488..bb4d6ae 100644
--- a/lib/Target/Sparc/SparcAsmPrinter.cpp
+++ b/lib/Target/Sparc/SparcAsmPrinter.cpp
@@ -63,7 +63,6 @@
bool printInstruction(const MachineInstr *MI); // autogenerated.
bool runOnMachineFunction(MachineFunction &F);
- std::string getSectionForFunction(const Function &F) const;
bool doInitialization(Module &M);
bool doFinalization(Module &M);
};
@@ -81,11 +80,6 @@
return new SparcAsmPrinter(o, tm, tm.getTargetAsmInfo());
}
-// Substitute old hook with new one temporary
-std::string SparcAsmPrinter::getSectionForFunction(const Function &F) const {
- return TAI->SectionForGlobal(&F);
-}
-
/// runOnMachineFunction - This uses the printInstruction()
/// method to print assembly for each instruction.
///
@@ -105,7 +99,7 @@
// Print out the label for the function.
const Function *F = MF.getFunction();
- SwitchToTextSection(getSectionForFunction(*F).c_str(), F);
+ SwitchToTextSection(TAI->SectionForGlobal(F).c_str(), F);
EmitAlignment(4, F);
O << "\t.globl\t" << CurrentFnName << '\n';