From b7b179ead9a5daff00a6ee1034be4dee2b5b462d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 15 Jul 2009 01:53:36 +0000 Subject: [PATCH] actually $stub labels *are* private, I just missed that printSuffixedName automatically does this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75727 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp index f23322fbfea..6c84ae801a0 100644 --- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp @@ -307,19 +307,15 @@ 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, isPrivate); + std::string Name = Mang->getMangledName(GV, Suffix, Suffix[0] != '\0'); decorateName(Name, GV); // Handle dllimport linkage.