[llvm-commits] [llvm] r75558 - in /llvm/trunk: include/llvm/Support/Mangler.h lib/VMCore/Mangler.cpp

Chris Lattner sabre at nondot.org
Mon Jul 13 16:50:59 PDT 2009


Author: lattner
Date: Mon Jul 13 18:50:53 2009
New Revision: 75558

URL: http://llvm.org/viewvc/llvm-project?rev=75558&view=rev
Log:
remove Mangler::getTypeID and related data, it was only used for mangling
local symbols and we haven't had type planes since llvm 1.9.

Modified:
    llvm/trunk/include/llvm/Support/Mangler.h
    llvm/trunk/lib/VMCore/Mangler.cpp

Modified: llvm/trunk/include/llvm/Support/Mangler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Mangler.h?rev=75558&r1=75557&r2=75558&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/Mangler.h (original)
+++ llvm/trunk/include/llvm/Support/Mangler.h Mon Jul 13 18:50:53 2009
@@ -50,11 +50,6 @@
   ///
   unsigned Count;
 
-  /// TypeMap - If the client wants us to unique types, this keeps track of the
-  /// current assignments and TypeCounter keeps track of the next id to assign.
-  DenseMap<const Type*, unsigned> TypeMap;
-  unsigned TypeCounter;
-
   /// AcceptableChars - This bitfield contains a one for each character that is
   /// allowed to be part of an unmangled name.
   unsigned AcceptableChars[256/32];
@@ -99,11 +94,6 @@
   ///
   std::string makeNameProper(const std::string &x, const char *Prefix = 0,
                              const char *PrivatePrefix = 0);
-
-private:
-  /// getTypeID - Return a unique ID for the specified LLVM type.
-  ///
-  unsigned getTypeID(const Type *Ty);
 };
 
 } // End llvm namespace

Modified: llvm/trunk/lib/VMCore/Mangler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Mangler.cpp?rev=75558&r1=75557&r2=75558&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Mangler.cpp (original)
+++ llvm/trunk/lib/VMCore/Mangler.cpp Mon Jul 13 18:50:53 2009
@@ -128,14 +128,6 @@
   return Result;
 }
 
-/// getTypeID - Return a unique ID for the specified LLVM type.
-///
-unsigned Mangler::getTypeID(const Type *Ty) {
-  unsigned &E = TypeMap[Ty];
-  if (E == 0) E = ++TypeCounter;
-  return E;
-}
-
 std::string Mangler::getValueName(const GlobalValue *GV, const char *Suffix) {
   // Check to see whether we've already named V.
   std::string &Name = Memo[GV];
@@ -162,7 +154,7 @@
 
 Mangler::Mangler(Module &M, const char *prefix, const char *privatePrefix)
   : Prefix(prefix), PrivatePrefix (privatePrefix), UseQuotes(false),
-    PreserveAsmNames(false), Count(0), TypeCounter(0) {
+    PreserveAsmNames(false), Count(0) {
   std::fill(AcceptableChars, array_endof(AcceptableChars), 0);
 
   // Letters and numbers are acceptable.





More information about the llvm-commits mailing list