diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-15 01:23:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-15 01:23:13 +0000 |
commit | 2e2ad51ffd1e0822c7dc128d96113874017ad079 (patch) | |
tree | 49fefe7367e9a5165527db2a08f0c270bd0285b8 | |
parent | 0f6c8f25aa96f765f19b555e4d610d5a7557ee95 (diff) | |
download | external_llvm-2e2ad51ffd1e0822c7dc128d96113874017ad079.zip external_llvm-2e2ad51ffd1e0822c7dc128d96113874017ad079.tar.gz external_llvm-2e2ad51ffd1e0822c7dc128d96113874017ad079.tar.bz2 |
$stub references should not be private ("L") labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75721 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp index 1257af5..f23322f 100644 --- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp @@ -307,16 +307,19 @@ void X86ATTAsmPrinter::printSymbolOperand(const MachineOperand &MO) { const GlobalValue *GV = MO.getGlobal(); const char *Suffix = ""; + bool isPrivate = false; if (MO.getTargetFlags() == X86II::MO_DARWIN_STUB) Suffix = "$stub"; else if (MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY || MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY_PIC_BASE || MO.getTargetFlags() == X86II::MO_DARWIN_HIDDEN_NONLAZY || - MO.getTargetFlags() == X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE) + MO.getTargetFlags() == X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE) { Suffix = "$non_lazy_ptr"; + isPrivate = true; + } - std::string Name = Mang->getMangledName(GV, Suffix, Suffix[0] != '\0'); + std::string Name = Mang->getMangledName(GV, Suffix, isPrivate); decorateName(Name, GV); // Handle dllimport linkage. @@ -409,8 +412,6 @@ void X86ATTAsmPrinter::print_pcrel_imm(const MachineInstr *MI, unsigned OpNo) { printBasicBlockLabel(MO.getMBB(), false, false, VerboseAsm); return; case MachineOperand::MO_GlobalAddress: - printSymbolOperand(MO); - return; case MachineOperand::MO_ExternalSymbol: printSymbolOperand(MO); return; |