diff options
author | Chris Lattner <sabre@nondot.org> | 2006-10-05 02:48:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-10-05 02:48:40 +0000 |
commit | 29bd9e12d4fbd667c56225872b15ca490440da46 (patch) | |
tree | dbf121e010aa41d38a378745c4256e839f9c863d /lib/Target/Sparc | |
parent | 6e79629dab80c8181e2dbd624de36b86217c1ef4 (diff) |
Use getSectionForFunction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30739 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc')
-rw-r--r-- | lib/Target/Sparc/SparcAsmPrinter.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp index f8efc9ee54..1c251e1bea 100644 --- a/lib/Target/Sparc/SparcAsmPrinter.cpp +++ b/lib/Target/Sparc/SparcAsmPrinter.cpp @@ -94,15 +94,17 @@ bool SparcAsmPrinter::runOnMachineFunction(MachineFunction &MF) { // What's my mangled name? CurrentFnName = Mang->getValueName(MF.getFunction()); - // Print out labels for the function. - SwitchToTextSection(".text", MF.getFunction()); - EmitAlignment(4, MF.getFunction()); + // Print out the label for the function. + const Function *F = MF.getFunction(); + SwitchToTextSection(getSectionForFunction(*F).c_str(), F); + EmitAlignment(4, F); O << "\t.globl\t" << CurrentFnName << "\n"; O << "\t.type\t" << CurrentFnName << ", #function\n"; O << CurrentFnName << ":\n"; // Number each basic block so that we can consistently refer to them // in PC-relative references. + // FIXME: Why not use the MBB numbers? NumberForBB.clear(); for (MachineFunction::const_iterator I = MF.begin(), E = MF.end(); I != E; ++I) { |