[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp

Chris Lattner sabre at nondot.org
Wed Oct 4 19:47:27 PDT 2006



Changes in directory llvm/lib/Target/Alpha:

AlphaAsmPrinter.cpp updated: 1.50 -> 1.51
---
Log message:

use getSectionForFunction to decide which section to emit code into


---
Diffs of the changes:  (+5 -4)

 AlphaAsmPrinter.cpp |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
diff -u llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.50 llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.51
--- llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.50	Mon Sep 18 13:01:03 2006
+++ llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp	Wed Oct  4 21:47:13 2006
@@ -58,7 +58,7 @@
     bool runOnMachineFunction(MachineFunction &F);
     bool doInitialization(Module &M);
     bool doFinalization(Module &M);
-
+    
     bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
                          unsigned AsmVariant, const char *ExtraCode);
     bool PrintAsmMemoryOperand(const MachineInstr *MI, 
@@ -73,8 +73,8 @@
 /// using the given target machine description.  This should work
 /// regardless of whether the function is in SSA form.
 ///
-FunctionPass *llvm::createAlphaCodePrinterPass (std::ostream &o,
-                                                  TargetMachine &tm) {
+FunctionPass *llvm::createAlphaCodePrinterPass(std::ostream &o,
+                                               TargetMachine &tm) {
   return new AlphaAsmPrinter(o, tm, tm.getTargetAsmInfo());
 }
 
@@ -166,7 +166,8 @@
 
   // Print out labels for the function.
   const Function *F = MF.getFunction();
-  SwitchToTextSection(".text", F);
+  SwitchToTextSection(getSectionForFunction(*F).c_str(), F);
+  
   EmitAlignment(4, F);
   switch (F->getLinkage()) {
   default: assert(0 && "Unknown linkage type!");






More information about the llvm-commits mailing list