Remove the use of "IncludeFile" from this support facility. The mechanism
[oota-llvm.git] / include / llvm / DerivedTypes.h
index 22807f1a6b926cd9d94a6a8dcee9850699a40ab9..e83679d04685e705690e04327c0e3b4240282f90 100644 (file)
@@ -19,7 +19,6 @@
 #define LLVM_DERIVED_TYPES_H
 
 #include "llvm/Type.h"
-#include "llvm/Support/DataTypes.h"
 
 namespace llvm {
 
@@ -31,18 +30,11 @@ class StructValType;
 class PointerValType;
 class PackedValType;
 
-class DerivedType : public Type, public AbstractTypeUser {
-  // AbstractTypeUsers - Implement a list of the users that need to be notified
-  // if I am a type, and I get resolved into a more concrete type.
-  //
-  mutable std::vector<AbstractTypeUser *> AbstractTypeUsers;
+class DerivedType : public Type {
   friend class Type;
 
 protected:
-  DerivedType(TypeID id) : Type("", id) {}
-  ~DerivedType() {
-    assert(AbstractTypeUsers.empty());
-  }
+  DerivedType(TypeID id) : Type(id) {}
 
   /// notifyUsesThatTypeBecameConcrete - Notify AbstractTypeUsers of this type
   /// that the current type has transitioned from being abstract to being
@@ -56,12 +48,6 @@ protected:
   ///
   void dropAllTypeUses();
 
-  void RefCountIsZero() const {
-    if (AbstractTypeUsers.empty())
-      delete this;
-  }
-
-
 public:
 
   //===--------------------------------------------------------------------===//
@@ -69,22 +55,6 @@ public:
   // are managed by (add|remove)AbstractTypeUser. See comments in
   // AbstractTypeUser.h for more information.
 
-  /// addAbstractTypeUser - Notify an abstract type that there is a new user of
-  /// it.  This function is called primarily by the PATypeHandle class.
-  ///
-  void addAbstractTypeUser(AbstractTypeUser *U) const {
-    assert(isAbstract() && "addAbstractTypeUser: Current type not abstract!");
-    AbstractTypeUsers.push_back(U);
-  }
-
-  /// removeAbstractTypeUser - Notify an abstract type that a user of the class
-  /// no longer has a handle to the type.  This function is called primarily by
-  /// the PATypeHandle class.  When there are no users of the abstract type, it
-  /// is annihilated, because there is no way to get a reference to it ever
-  /// again.
-  ///
-  void removeAbstractTypeUser(AbstractTypeUser *U) const;
-
   /// refineAbstractTypeTo - This function is used to when it is discovered that
   /// the 'this' abstract type is actually equivalent to the NewType specified.
   /// This causes all users of 'this' to switch to reference the more concrete