diff options
author | Jim Laskey <jlaskey@mac.com> | 2007-02-21 22:47:38 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2007-02-21 22:47:38 +0000 |
commit | bda9b0ec7bd6974cebf751ecd23c5434b34054e9 (patch) | |
tree | c36ff74f5e1ec34a3e3e707e48b202b3323144ff /lib/Target/PowerPC/PPCAsmPrinter.cpp | |
parent | a15be8ce3aaaebc675f99302e2c5e1c564268322 (diff) |
Add support for changes in DwarfWriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34478 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCAsmPrinter.cpp')
-rw-r--r-- | lib/Target/PowerPC/PPCAsmPrinter.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index c3ae5c8bbf..fc952273ff 100644 --- a/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -280,6 +280,8 @@ namespace { 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 @@ void PPCAsmPrinter::printOp(const MachineOperand &MO) { } } +/// 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, |