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

Chris Lattner lattner at cs.uiuc.edu
Thu Sep 4 18:42:01 PDT 2003


Changes in directory llvm/lib/VMCore:

Type.cpp updated: 1.60 -> 1.61

---
Log message:

Don't try to be sneaky, breaking recursive types in the process


---
Diffs of the changes:

Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.60 llvm/lib/VMCore/Type.cpp:1.61
--- llvm/lib/VMCore/Type.cpp:1.60	Wed Sep  3 09:44:53 2003
+++ llvm/lib/VMCore/Type.cpp	Thu Sep  4 18:41:03 2003
@@ -211,10 +211,7 @@
 
   // In order to reduce the amount of repeated computation, we cache the
   // computed value for later.
-  if (Ty->isAbstract())
-    return AbstractTypeDescriptions[Ty] = Result;
-  else
-    return ConcreteTypeDescriptions[Ty] = Result;
+  return Result;
 }
 
 
@@ -225,9 +222,7 @@
   if (I != Map.end()) return I->second;
     
   std::vector<const Type *> TypeStack;
-  getTypeDescription(Ty, TypeStack);
-  assert(Map.count(Ty) && "Type didn't get inserted!!");
-  return Map[Ty];
+  return Map[Ty] = getTypeDescription(Ty, TypeStack);
 }
 
 





More information about the llvm-commits mailing list