[llvm-commits] CVS: llvm/lib/VMCore/Type.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Jul 8 17:32:07 PDT 2004


Changes in directory llvm/lib/VMCore:

Type.cpp updated: 1.108 -> 1.109

---
Log message:

The uid mapping is no more


---
Diffs of the changes:  (+1 -12)

Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.108 llvm/lib/VMCore/Type.cpp:1.109
--- llvm/lib/VMCore/Type.cpp:1.108	Thu Jul  8 12:30:07 2004
+++ llvm/lib/VMCore/Type.cpp	Thu Jul  8 17:31:09 2004
@@ -34,9 +34,6 @@
 //                         Type Class Implementation
 //===----------------------------------------------------------------------===//
 
-static unsigned CurUID = 0;
-static std::vector<const Type *> UIDMappings;
-
 // Concrete/Abstract TypeDescriptions - We lazily calculate type descriptions
 // for types as they are needed.  Because resolution of types must invalidate
 // all of the abstract type descriptions, we keep them in a seperate map to make
@@ -50,8 +47,6 @@
     ConcreteTypeDescriptions[this] = name;
   ID = id;
   Abstract = false;
-  UID = CurUID++;       // Assign types UID's as they are created
-  UIDMappings.push_back(this);
 }
 
 void Type::setName(const std::string &Name, SymbolTable *ST) {
@@ -59,12 +54,6 @@
   if (!Name.empty()) ST->insert(Name, this);
 }
 
-const Type *Type::getUniqueIDType(unsigned UID) {
-  assert(UID < UIDMappings.size() && 
-         "Type::getPrimitiveType: UID out of range!");
-  return UIDMappings[UID];
-}
-
 const Type *Type::getPrimitiveType(TypeID IDNumber) {
   switch (IDNumber) {
   case VoidTyID  : return VoidTy;
@@ -209,7 +198,7 @@
       AbstractTypeDescriptions.lower_bound(Ty);
     if (I != AbstractTypeDescriptions.end() && I->first == Ty)
       return I->second;
-    std::string Desc = "opaque"+utostr(Ty->getUniqueID());
+    std::string Desc = "opaque";
     AbstractTypeDescriptions.insert(std::make_pair(Ty, Desc));
     return Desc;
   }





More information about the llvm-commits mailing list