[llvm-commits] [llvm] r98324 - in /llvm/trunk: include/llvm/Target/Mangler.h lib/Target/TargetLoweringObjectFile.cpp

Chris Lattner sabre at nondot.org
Thu Mar 11 17:56:43 PST 2010


Author: lattner
Date: Thu Mar 11 19:56:43 2010
New Revision: 98324

URL: http://llvm.org/viewvc/llvm-project?rev=98324&view=rev
Log:
make TargetLoweringObjectFile::getExprForDwarfReference
just make unnamed temp symbols instead of having to come
up with its own names.

Modified:
    llvm/trunk/include/llvm/Target/Mangler.h
    llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp

Modified: llvm/trunk/include/llvm/Target/Mangler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/Mangler.h?rev=98324&r1=98323&r2=98324&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/Mangler.h (original)
+++ llvm/trunk/include/llvm/Target/Mangler.h Thu Mar 11 19:56:43 2010
@@ -51,12 +51,6 @@
   // symbols.
   Mangler(const MCAsmInfo &mai) : MAI(mai), NextAnonGlobalID(1) {}
 
-  /// getUniqueID() - Allocate and return a unique ID.
-  /// FIXME: Remove this.
-  unsigned getUniqueID() {
-    return NextAnonGlobalID++;
-  }
-  
   /// getNameWithPrefix - Fill OutName with the name of the appropriate prefix
   /// and the specified global variable's name.  If the global variable doesn't
   /// have a name, this fills in a unique name for the global.

Modified: llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp?rev=98324&r1=98323&r2=98324&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp Thu Mar 11 19:56:43 2010
@@ -326,11 +326,7 @@
   case dwarf::DW_EH_PE_pcrel: {
     // Emit a label to the streamer for the current position.  This gives us
     // .-foo addressing.
-    SmallString<128> Name;
-    Mang->getNameWithPrefix(Name, Twine("PCtemp") + Twine(Mang->getUniqueID()),
-                            Mangler::Private);
-
-    MCSymbol *PCSym = getContext().GetOrCreateTemporarySymbol(Name.str());
+    MCSymbol *PCSym = getContext().GetOrCreateTemporarySymbol();
     Streamer.EmitLabel(PCSym);
     const MCExpr *PC = MCSymbolRefExpr::Create(PCSym, getContext());
     return MCBinaryExpr::CreateSub(Res, PC, getContext());





More information about the llvm-commits mailing list