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 | d4d255a40830202337408431dc7f601bb1ffbd9f (patch) | |
| tree | d6e5667c1eabad413cbf393c58500140972128b8 /llvm/lib/Target/Sparc | |
| parent | c8c78982d4a9466320090d932d1f6eeaf0918bec (diff) | |
| download | bcm5719-llvm-d4d255a40830202337408431dc7f601bb1ffbd9f.tar.gz bcm5719-llvm-d4d255a40830202337408431dc7f601bb1ffbd9f.zip | |
Use getSectionForFunction
llvm-svn: 30739
Diffstat (limited to 'llvm/lib/Target/Sparc')
| -rw-r--r-- | llvm/lib/Target/Sparc/SparcAsmPrinter.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp b/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp index f8efc9ee545..1c251e1beab 100644 --- a/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp +++ b/llvm/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) { |

