OSDN Git Service

remove Mangler::getTypeID and related data, it was only used for mangling
authorChris Lattner <sabre@nondot.org>
Mon, 13 Jul 2009 23:50:53 +0000 (23:50 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 13 Jul 2009 23:50:53 +0000 (23:50 +0000)
local symbols and we haven't had type planes since llvm 1.9.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75558 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Mangler.h
lib/VMCore/Mangler.cpp

index 1de1905..33ed102 100644 (file)
@@ -50,11 +50,6 @@ class Mangler {
   ///
   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 @@ public:
   ///
   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
index 5a4df62..625c9c3 100644 (file)
@@ -128,14 +128,6 @@ std::string Mangler::makeNameProper(const std::string &X, const char *Prefix,
   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 @@ std::string Mangler::getValueName(const GlobalValue *GV, const char *Suffix) {
 
 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.