[llvm-commits] [llvm] r98578 - /llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp

Chris Lattner sabre at nondot.org
Mon Mar 15 13:37:58 PDT 2010


Author: lattner
Date: Mon Mar 15 15:37:57 2010
New Revision: 98578

URL: http://llvm.org/viewvc/llvm-project?rev=98578&view=rev
Log:
use Mang->getSymbol() 

Modified:
    llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp

Modified: llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp?rev=98578&r1=98577&r2=98578&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp Mon Mar 15 15:37:57 2010
@@ -40,13 +40,7 @@
   // On Darwin/X86-64, we can reference dwarf symbols with foo at GOTPCREL+4, which
   // is an indirect pc-relative reference.
   if (Encoding & (DW_EH_PE_indirect | DW_EH_PE_pcrel)) {
-    SmallString<128> Name;
-    Mang->getNameWithPrefix(Name, GV, false);
-    const MCSymbol *Sym;
-    if (GV->hasPrivateLinkage())
-      Sym = getContext().GetOrCreateTemporarySymbol(Name);
-    else
-      Sym = getContext().GetOrCreateSymbol(Name);
+    const MCSymbol *Sym = Mang->getSymbol(GV);
     const MCExpr *Res =
       X86MCTargetExpr::Create(Sym, X86MCTargetExpr::GOTPCREL, getContext());
     const MCExpr *Four = MCConstantExpr::Create(4, getContext());





More information about the llvm-commits mailing list