mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-24 08:18:33 +00:00
* Delete getNumAbstractTypeUsers method
* Move addAbstractTypeUser method to Type.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2120 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -14,17 +14,20 @@
|
|||||||
#include "llvm/Type.h"
|
#include "llvm/Type.h"
|
||||||
|
|
||||||
class DerivedType : public Type {
|
class DerivedType : public Type {
|
||||||
|
char isRefining; // Used for recursive types
|
||||||
|
|
||||||
// AbstractTypeUsers - Implement a list of the users that need to be notified
|
// 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.
|
// if I am a type, and I get resolved into a more concrete type.
|
||||||
//
|
//
|
||||||
///// FIXME: kill mutable nonsense when Type's are not const
|
///// FIXME: kill mutable nonsense when Type's are not const
|
||||||
mutable std::vector<AbstractTypeUser *> AbstractTypeUsers;
|
mutable std::vector<AbstractTypeUser *> AbstractTypeUsers;
|
||||||
|
|
||||||
char isRefining; // Used for recursive types
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
inline DerivedType(PrimitiveID id) : Type("", id) {
|
inline DerivedType(PrimitiveID id) : Type("", id) {
|
||||||
isRefining = false;
|
isRefining = 0;
|
||||||
|
}
|
||||||
|
~DerivedType() {
|
||||||
|
assert(AbstractTypeUsers.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
// typeIsRefined - Notify AbstractTypeUsers of this type that the current type
|
// typeIsRefined - Notify AbstractTypeUsers of this type that the current type
|
||||||
@@ -50,14 +53,7 @@ public:
|
|||||||
// addAbstractTypeUser - Notify an abstract type that there is a new user of
|
// addAbstractTypeUser - Notify an abstract type that there is a new user of
|
||||||
// it. This function is called primarily by the PATypeHandle class.
|
// it. This function is called primarily by the PATypeHandle class.
|
||||||
//
|
//
|
||||||
void addAbstractTypeUser(AbstractTypeUser *U) const {
|
void addAbstractTypeUser(AbstractTypeUser *U) const;
|
||||||
assert(isAbstract() && "addAbstractTypeUser: Current type not abstract!");
|
|
||||||
#if 0
|
|
||||||
cerr << " addAbstractTypeUser[" << (void*)this << ", " << getDescription()
|
|
||||||
<< "][" << AbstractTypeUsers.size() << "] User = " << U << endl;
|
|
||||||
#endif
|
|
||||||
AbstractTypeUsers.push_back(U);
|
|
||||||
}
|
|
||||||
|
|
||||||
// removeAbstractTypeUser - Notify an abstract type that a user of the class
|
// 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
|
// no longer has a handle to the type. This function is called primarily by
|
||||||
@@ -66,12 +62,6 @@ public:
|
|||||||
//
|
//
|
||||||
void removeAbstractTypeUser(AbstractTypeUser *U) const;
|
void removeAbstractTypeUser(AbstractTypeUser *U) const;
|
||||||
|
|
||||||
// getNumAbstractTypeUsers - Return the number of users registered to the type
|
|
||||||
inline unsigned getNumAbstractTypeUsers() const {
|
|
||||||
assert(isAbstract() && "getNumAbstractTypeUsers: Type not abstract!");
|
|
||||||
return AbstractTypeUsers.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
// refineAbstractTypeTo - This function is used to when it is discovered that
|
// refineAbstractTypeTo - This function is used to when it is discovered that
|
||||||
// the 'this' abstract type is actually equivalent to the NewType specified.
|
// the 'this' abstract type is actually equivalent to the NewType specified.
|
||||||
// This causes all users of 'this' to switch to reference the more concrete
|
// This causes all users of 'this' to switch to reference the more concrete
|
||||||
|
|||||||
Reference in New Issue
Block a user