[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
Chris Lattner
sabre at nondot.org
Wed Oct 4 19:48:54 PDT 2006
Changes in directory llvm/lib/Target/Sparc:
SparcAsmPrinter.cpp updated: 1.69 -> 1.70
---
Log message:
Use getSectionForFunction
---
Diffs of the changes: (+5 -3)
SparcAsmPrinter.cpp | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
Index: llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
diff -u llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.69 llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.70
--- llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.69 Thu Sep 14 13:23:27 2006
+++ llvm/lib/Target/Sparc/SparcAsmPrinter.cpp Wed Oct 4 21:48:40 2006
@@ -94,15 +94,17 @@
// 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) {
More information about the llvm-commits
mailing list