[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

Jim Laskey jlaskey at apple.com
Wed Feb 21 14:48:00 PST 2007



Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.233 -> 1.234
---
Log message:

Add support for changes in DwarfWriter.

---
Diffs of the changes:  (+14 -0)

 PPCAsmPrinter.cpp |   14 ++++++++++++++
 1 files changed, 14 insertions(+)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.233 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.234
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.233	Wed Jan 31 18:39:08 2007
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp	Wed Feb 21 16:47:38 2007
@@ -280,6 +280,8 @@
     
     virtual bool runOnMachineFunction(MachineFunction &F) = 0;
     virtual bool doFinalization(Module &M) = 0;
+
+    virtual void EmitExternalGlobal(const GlobalVariable *GV);
   };
 
   /// LinuxAsmPrinter - PowerPC assembly printer, customized for Linux
@@ -401,6 +403,18 @@
   }
 }
 
+/// EmitExternalGlobal - In this case we need to use the indirect symbol.
+///
+void PPCAsmPrinter::EmitExternalGlobal(const GlobalVariable *GV) {
+  std::string Name = getGlobalLinkName(GV);
+  if (TM.getRelocationModel() != Reloc::Static) {
+    GVStubs.insert(Name);
+    O << "L" << Name << "$non_lazy_ptr";
+    return;
+  }
+  O << Name;
+}
+
 /// PrintAsmOperand - Print out an operand for an inline asm expression.
 ///
 bool PPCAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,






More information about the llvm-commits mailing list